Fix other bugs in strpool

This commit is contained in:
pancake 2015-04-12 01:12:54 +02:00
parent 48dedef883
commit 4bfd019175

View File

@ -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;
}