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
Fix some last coverities #10735
Fix some last coverities #10735
Conversation
I believe the wrong tests are all due to the recent changes in r2regressions, but let's wait that they get resolved to be 100% sure |
21de862
to
5bda075
Compare
libr/asm/asm.c
Outdated
@@ -309,10 +309,12 @@ R_API int r_asm_use(RAsm *a, const char *name) { | |||
r_list_foreach (a->plugins, iter, h) { | |||
if (!strcmp (h->name, name) && h->arch) { | |||
if (!a->cur || (a->cur && strcmp (a->cur->arch, h->arch))) { | |||
char *file = r_str_newf ("%s/%s.sdb", r_str_r2_prefix (R2_SDB_OPCODES), h->arch); | |||
char *r2prefix = r_str_r2_prefix (R2_SDB_OPCODES); | |||
char *file = r_str_newf ("%s/%s.sdb", r2prefix, h->arch); |
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.
r2prefix can be null, so better use r_str_get in here to avoid the undefined behaviour of passing NULL to %s. or just if (r2prefix) { ...
5bda075
to
404d971
Compare
please rebase. master should be green |
33b19a1
to
030f0d5
Compare
030f0d5
to
d94d803
Compare
Ok finally green now :) |
No description provided.