mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-28 23:50:40 +00:00
Fix other bugs in strpool
This commit is contained in:
parent
48dedef883
commit
4bfd019175
@ -34,10 +34,14 @@ R_API char *r_strpool_alloc (RStrpool *p, int l) {
|
||||
}
|
||||
if (p->size < osize) {
|
||||
eprintf ("Underflow!\n");
|
||||
p->size = osize;
|
||||
return NULL;
|
||||
}
|
||||
ret = realloc (p->str, p->size);
|
||||
if (!ret) return NULL;
|
||||
if (!ret) {
|
||||
p->size = osize;
|
||||
return NULL;
|
||||
}
|
||||
p->str = ret;
|
||||
ret += p->len;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user