Commit bc6e5876 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Fix CID 33289: Dereference null return value

parent bdb03b82
......@@ -1861,11 +1861,12 @@ void decompile(FILE *bin, FILE *srcfile)
break;
case CS_COMPARE_ARS:
fread(&uch,1,1,bin);
p=(char *)malloc(uch);
fread(p,uch,1,bin);
WRITE_NAME("COMPARE_ARS");
sprintf(strchr(src,0),"%s\n",decompile_ars((uchar*)p,uch));
free(p);
if((p=(char *)malloc(uch)) != NULL) {
fread(p,uch,1,bin);
WRITE_NAME("COMPARE_ARS");
sprintf(strchr(src,0),"%s\n",decompile_ars((uchar*)p,uch));
free(p);
}
break;
case CS_TOGGLE_USER_MISC:
MLNG("TOGGLE_USER_MISC");
......
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