Fix possible null deref in bin.get_info

This commit is contained in:
pancake 2014-02-14 11:51:08 +01:00
parent 6d04a5ebec
commit cb7c2b7f56

View File

@ -576,7 +576,8 @@ R_API RList* r_bin_get_imports(RBin *bin) {
}
R_API RBinInfo* r_bin_get_info(RBin *bin) {
if (!bin->cur->buf) return NULL;
if (!bin || !bin->cur || !bin->cur->buf)
return NULL;
return bin->cur->o->info;
}