mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-09 06:50:49 +00:00
Fix section->size = 0 assert
This commit is contained in:
parent
5535b6f380
commit
c9472f4768
@ -5,7 +5,6 @@
|
||||
This code has been written by pancake which has been based on Alvaro's r2pipe-python
|
||||
script which was based on FireEye script for IDA Pro.
|
||||
|
||||
*
|
||||
* https://www.fireeye.com/blog/threat-research/2017/03/introduction_to_reve.html
|
||||
#endif
|
||||
|
||||
|
@ -2464,7 +2464,7 @@ static int bin_sections(RCore *r, int mode, ut64 laddr, int va, ut64 at, const c
|
||||
free (hashstr);
|
||||
} else if (IS_MODE_JSON (mode)) {
|
||||
char *hashstr = NULL;
|
||||
if (chksum) {
|
||||
if (chksum && section->size > 0) {
|
||||
ut8 *data = malloc (section->size);
|
||||
if (!data) {
|
||||
goto out;
|
||||
@ -2474,7 +2474,6 @@ static int bin_sections(RCore *r, int mode, ut64 laddr, int va, ut64 at, const c
|
||||
hashstr = build_hash_string (mode, chksum,
|
||||
data, datalen);
|
||||
free (data);
|
||||
|
||||
}
|
||||
r_cons_printf ("%s{\"name\":\"%s\","
|
||||
"\"size\":%"PFMT64d","
|
||||
|
Loading…
Reference in New Issue
Block a user