diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | plugins/pychrysa/analysis/binary.c | 9 | ||||
-rw-r--r-- | plugins/pychrysa/pychrysa.c | 2 | ||||
-rw-r--r-- | src/core/core.c | 7 | ||||
-rw-r--r-- | src/format/elf/section.c | 5 | ||||
-rw-r--r-- | src/main.c | 5 |
6 files changed, 30 insertions, 7 deletions
@@ -1,5 +1,14 @@ 15-10-16 Cyrille Bagard <nocbos@gmail.com> + * plugins/pychrysa/analysis/binary.c: + * plugins/pychrysa/pychrysa.c: + * src/core/core.c: + * src/format/elf/section.c: + * src/main.c: + Prevent some mistakes pointed by Melkor. + +15-10-16 Cyrille Bagard <nocbos@gmail.com> + * tools/ffuzzer/ffuzzer.sh: * tools/ffuzzer/process.py: Define a basic system based on Melkor to stress the disassembler and diff --git a/plugins/pychrysa/analysis/binary.c b/plugins/pychrysa/analysis/binary.c index 9e45e27..93b1c57 100644 --- a/plugins/pychrysa/analysis/binary.c +++ b/plugins/pychrysa/analysis/binary.c @@ -28,6 +28,9 @@ #include <pygobject.h> +#include <i18n.h> + + #include <analysis/binary.h> @@ -82,7 +85,11 @@ static PyObject *py_loaded_binary_new(PyTypeObject *type, PyObject *args, PyObje if (!ret) return NULL; ret = PyObject_IsInstance(content_obj, (PyObject *)get_python_binary_content_type()); - if (!ret) return NULL; + if (ret == 0) + { + PyErr_SetString(PyExc_TypeError, _("Expected a BinContent as argument")); + return NULL; + } content = G_BIN_CONTENT(pygobject_get(content_obj)); binary = g_loaded_binary_new(content); diff --git a/plugins/pychrysa/pychrysa.c b/plugins/pychrysa/pychrysa.c index c77553b..d241b92 100644 --- a/plugins/pychrysa/pychrysa.c +++ b/plugins/pychrysa/pychrysa.c @@ -526,6 +526,8 @@ PyMODINIT_FUNC PyInit_pychrysalide(void) init_work_queue(NULL/* !! */); #endif + init_work_queue(NULL/* !! */); + //////////////////////// diff --git a/src/core/core.c b/src/core/core.c index accb3da..0460a23 100644 --- a/src/core/core.c +++ b/src/core/core.c @@ -24,10 +24,14 @@ #include "core.h" +#include <config.h> + + #include "collections.h" #include "formats.h" #include "params.h" #include "processors.h" +#include "../gtkext/support.h" @@ -54,6 +58,9 @@ bool load_all_basic_components(void) { result = true; + add_pixmap_directory(PACKAGE_DATA_DIR); + add_pixmap_directory(PACKAGE_SOURCE_DIR G_DIR_SEPARATOR_S "pixmaps"); + result &= load_main_config_parameters(); result &= g_generic_config_read(get_main_configuration()); diff --git a/src/format/elf/section.c b/src/format/elf/section.c index 2b46d9e..60bd67a 100644 --- a/src/format/elf/section.c +++ b/src/format/elf/section.c @@ -93,9 +93,8 @@ bool find_elf_section_by_name(const GElfFormat *format, const char *name, elf_sh secname = extract_name_from_elf_string_section(format, &strings, ELF_SHDR(format, *section, sh_name)); - /* FIXME : if secname == NULL */ - - result = (strcmp(name, secname) == 0); + if (secname != NULL) + result = (strcmp(name, secname) == 0); } @@ -36,7 +36,6 @@ #include "core/params.h" #include "glibext/delayed.h" #include "glibext/gbinportion.h" -#include "gtkext/support.h" #include "gtkext/theme.h" #include "plugins/pglist.h" #include "../revision.h" @@ -127,8 +126,8 @@ int main(int argc, char **argv) */ /*LIBXML_TEST_VERSION*/ - add_pixmap_directory(PACKAGE_DATA_DIR); - add_pixmap_directory(PACKAGE_SOURCE_DIR G_DIR_SEPARATOR_S "pixmaps"); + //add_pixmap_directory(PACKAGE_DATA_DIR); + //add_pixmap_directory(PACKAGE_SOURCE_DIR G_DIR_SEPARATOR_S "pixmaps"); /* Création de l'interface */ |