Fix the famous shlr/java overflow. Move along, nothing to see here

This commit is contained in:
pancake 2014-01-10 19:07:25 +01:00
parent 1066c7a4f6
commit 03ff72079f
2 changed files with 5 additions and 4 deletions

View File

@ -195,3 +195,5 @@ There's a branch for that
Everything up-to-date.
Sharing your latest session in Facebook...
This should be documented, since it's not that obvious
It's working! Look at the door!
This is an unacceptable milion year dungeon.

View File

@ -534,11 +534,11 @@ static void add_method_infos_to_sdb( RBinJavaObj *bin){
}
key_size += strlen(class_name);
value_buffer_size += strlen(class_name);
value_buffer_size += strlen (class_name);
method_key = malloc (key_size);
value_buffer = malloc (key_size);
method_key_value = malloc(key_size);
value_buffer = malloc (value_buffer_size);
method_key_value = malloc (key_size);
snprintf (method_key, key_size, "%s.methods", class_name);
method_key[key_size-1] = 0;
@ -580,7 +580,6 @@ static void add_method_infos_to_sdb( RBinJavaObj *bin){
sdb_apush (bin->kv, method_key, value_buffer, 0);
// generate info key, and place values in method info array
bytes_written = snprintf (method_key, key_size, "%s.info", method_key_value);
method_key[key_size-1] = 0;