Fix #7887 - null deref in bin_get_endian()

This commit is contained in:
pancake 2017-07-09 13:08:13 +02:00
parent bd3247c03b
commit 9372c11996

View File

@ -1986,7 +1986,7 @@ R_API RList *r_bin_get_mem(RBin *bin) {
R_API int r_bin_is_big_endian(RBin *bin) {
RBinObject *o = r_bin_cur_object (bin);
return o? o->info->big_endian: -1;
return (o && o->info)? o->info->big_endian: -1;
}
R_API int r_bin_is_stripped(RBin *bin) {