Commit 94f71558 by Victor Manuel Alvarez

Add error message for ERROR_UNSUPPORTED_FILE_VERSION

parent 99b36152
......@@ -424,7 +424,7 @@ PyObject* convert_object_to_python(
case OBJECT_TYPE_STRING:
if (object->value.ss != NULL)
result = PyBytes_FromStringAndSize(
object->value.ss->c_string,
object->value.ss->c_string,
object->value.ss->length);
break;
......@@ -903,8 +903,8 @@ PyObject* handle_error(
{
case ERROR_COULD_NOT_ATTACH_TO_PROCESS:
return PyErr_Format(
YaraError,
"access denied");
YaraError,
"access denied");
case ERROR_INSUFFICIENT_MEMORY:
return PyErr_NoMemory();
case ERROR_COULD_NOT_OPEN_FILE:
......@@ -936,6 +936,11 @@ PyObject* handle_error(
YaraError,
"external variable \"%s\" was already defined with a different type",
extra);
case ERROR_UNSUPPORTED_FILE_VERSION:
return PyErr_Format(
YaraError,
"rules file \"%s\" is incompatible with this version of YARA",
extra);
default:
return PyErr_Format(
YaraError,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment