New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infer fixes - round 2 #4993
Infer fixes - round 2 #4993
Conversation
please squash |
if you fix stuff in sdb do it in the original repo , not here |
Ok... shall I unstage all shlr commits in that case? |
only sdb and capstone, the other ones are not living outside |
@@ -153,9 +153,12 @@ R_API ut8 *r_crypto_get_output(RCrypto *cry, int *size) { | |||
memcpy (buf, cry->output, *size); | |||
} else { | |||
/* initialize */ | |||
const int size = 4096; | |||
cry->output = realloc(buf, size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing space
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if realloc fails it will leak buf
fully reviewed. please address those comments and i'll merge |
@@ -167,8 +167,8 @@ static int r_debug_bf_kill(RDebug *dbg, int pid, int tid, int sig) { | |||
static RList *r_debug_native_map_get(RDebug *dbg) { | |||
RIOBdescbg *o = dbg->iob.io->desc->data; | |||
BfvmCPU *c = o->bfvm; | |||
RList *list = r_list_new (); | |||
list->free = (RListFree)r_debug_map_free; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r_debug_map_free is better than just plain free
R_API void r_debug_map_free(RDebugMap *map) {
free (map->name);
free (map);
}
ping |
Squashed: Fix PR issues Squashed: More PR Fixes
This series of commits bring the infer result to
The memory leaks are down to things being added to a list, causing false positives.
I haven't fully worked through shlr and some other files where I wasn't entirely sure how to handle the errors.