mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-10 16:23:08 +00:00
Fix null ptr deref
This commit is contained in:
parent
353ecec16c
commit
f1e42d9448
@ -136,8 +136,8 @@ R_API int r_anal_fcn(RAnal *anal, RAnalFunction *fcn, ut64 addr, ut8 *buf, ut64
|
||||
fcn->addr = addr;
|
||||
fcn->type = (reftype==R_ANAL_REF_TYPE_CODE)?
|
||||
R_ANAL_FCN_TYPE_LOC: R_ANAL_FCN_TYPE_FCN;
|
||||
if (len>16)
|
||||
len -= 16; // XXX: hack to avoid buffer overflow by reading >64 bytes..
|
||||
//if (len>16)
|
||||
// len -= 16; // XXX: hack to avoid buffer overflow by reading >64 bytes..
|
||||
|
||||
while (idx < len) {
|
||||
r_anal_op_fini (&op);
|
||||
|
@ -84,7 +84,7 @@ R_API int r_meta_del(RMeta *m, int type, ut64 from, ut64 size, const char *str)
|
||||
|
||||
r_list_foreach_safe (m->data, iter, iter_tmp, d) {
|
||||
if (d->type == type || type == R_META_TYPE_ANY) {
|
||||
if (str != NULL && !strstr (d->str, str))
|
||||
if (str && d->str && !strstr (d->str, str))
|
||||
continue;
|
||||
if (size==UT64_MAX || (from+size >= d->from && from <= d->to+size)) {
|
||||
free (d->str);
|
||||
|
Loading…
x
Reference in New Issue
Block a user