mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-19 05:38:43 +00:00
Fix more null derefs
This commit is contained in:
parent
5466457428
commit
99e96c70f7
@ -856,8 +856,17 @@ R_API int r_bin_file_hash(RBin *bin, ut64 limit, const char *file) {
|
||||
ut64 buf_len = 0;
|
||||
int i;
|
||||
RBinFile *bf = bin->cur;
|
||||
if (!bf) {
|
||||
return 0;
|
||||
}
|
||||
RBinObject *o = bf->o;
|
||||
if (!o) {
|
||||
return 0;
|
||||
}
|
||||
RIODesc *iod = r_io_desc_get (bin->iob.io, bf->fd);
|
||||
if (!iod) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!file && iod) {
|
||||
file = iod->name;
|
||||
|
Loading…
x
Reference in New Issue
Block a user