diff options
Diffstat (limited to 'src/format')
-rw-r--r-- | src/format/dex/pool.c | 2 | ||||
-rw-r--r-- | src/format/java/java-int.c | 2 | ||||
-rwxr-xr-x | src/format/java/pool.c | 8 | ||||
-rw-r--r-- | src/format/mangling/itanium/abi.c | 2 | ||||
-rw-r--r-- | src/format/mangling/itanium/component.c | 3 |
5 files changed, 13 insertions, 4 deletions
diff --git a/src/format/dex/pool.c b/src/format/dex/pool.c index 904ab76..1724dd9 100644 --- a/src/format/dex/pool.c +++ b/src/format/dex/pool.c @@ -403,6 +403,8 @@ GBinRoutine *get_prototype_from_dex_pool(GDexFormat *format, uint32_t index) uint32_t i; /* Boucle de parcours */ GBinVariable *arg; /* Argument reconstitué */ + result = NULL; + if (index >= format->header.method_ids_size) goto grfdp_error; diff --git a/src/format/java/java-int.c b/src/format/java/java-int.c index a201d50..6b08a95 100644 --- a/src/format/java/java-int.c +++ b/src/format/java/java-int.c @@ -51,6 +51,8 @@ bool read_java_header(const GJavaFormat *format, off_t *pos, java_header *header uint32_t magic; /* Identifiant Java */ size_t i; /* Boucle de parcours */ + result = true; + content = NULL; //G_BIN_FORMAT(format)->content; length = 0; //G_BIN_FORMAT(format)->length; diff --git a/src/format/java/pool.c b/src/format/java/pool.c index f23cd41..7382f5f 100755 --- a/src/format/java/pool.c +++ b/src/format/java/pool.c @@ -63,7 +63,7 @@ bool load_java_pool(GJavaFormat *format, off_t *pos) result = false/*read_u16(&count, G_BIN_FORMAT(format)->content, pos, G_BIN_FORMAT(format)->length, SRE_BIG)*/; - +#if 0 printf("Alloc %hu entries (result=%d)\n", count, result); format->header.pool_len = count - 1; @@ -85,7 +85,7 @@ bool load_java_pool(GJavaFormat *format, off_t *pos) } } - +#endif return result; } @@ -163,9 +163,9 @@ bool load_java_pool_entry(GJavaFormat *format, constant_pool_entry *entry, off_t result = false/*read_u8(&tag, G_BIN_FORMAT(format)->content, pos, G_BIN_FORMAT(format)->length, SRE_BIG)*/; - - entry->tag = tag; #if 0 + entry->tag = tag; + switch (entry->tag) { case CONSTANT_CLASS: diff --git a/src/format/mangling/itanium/abi.c b/src/format/mangling/itanium/abi.c index f02d4cc..b9c3dfa 100644 --- a/src/format/mangling/itanium/abi.c +++ b/src/format/mangling/itanium/abi.c @@ -2271,6 +2271,8 @@ static itanium_component *itd_expr_primary(GItaniumDContext *context) itd_unref_comp(type); } + else + result = NULL; /* Règle <mangled-name> */ diff --git a/src/format/mangling/itanium/component.c b/src/format/mangling/itanium/component.c index def9a38..d147ba8 100644 --- a/src/format/mangling/itanium/component.c +++ b/src/format/mangling/itanium/component.c @@ -593,6 +593,9 @@ char *itd_translate_component(GItaniumDContext *context, const itanium_component case IOT_VENDOR: result = stradd(base, "TODO_VENDOR"); break; + default: + result = NULL; + break; } break; |