mirror of
https://github.com/radareorg/radare2.git
synced 2025-04-02 09:31:45 +00:00
Early check to avoid null deref on files with missing buffer ##bin
* Caused by a bug when xtr plugin doesnt provide the right data back
This commit is contained in:
parent
0fe2fab15c
commit
3e8bea04eb
@ -350,6 +350,10 @@ static int rabin_do_operation(RBin *bin, const char *op, int rad, const char *ou
|
||||
}
|
||||
RBinFile *bf = r_bin_cur (bin);
|
||||
if (bf) {
|
||||
if (!bf->buf) {
|
||||
R_LOG_ERROR ("Missing data buffer");
|
||||
return false;
|
||||
}
|
||||
RBuffer *nb = r_buf_new_with_buf (bf->buf);
|
||||
r_buf_free (bf->buf);
|
||||
bf->buf = nb;
|
||||
|
Loading…
x
Reference in New Issue
Block a user