Skip to content
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

Merged
merged 5 commits into from Jul 16, 2018
Merged

Fix some last coverities #10735

merged 5 commits into from Jul 16, 2018

Conversation

@cyanpencil
Copy link
Contributor

@cyanpencil cyanpencil commented Jul 15, 2018

No description provided.

@cyanpencil
Copy link
Contributor Author

@cyanpencil cyanpencil commented Jul 15, 2018

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

@cyanpencil cyanpencil force-pushed the cyanpencil:fix-coverities branch 5 times, most recently from 21de862 to 5bda075 Jul 15, 2018
@@ -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);

This comment has been minimized.

@radare

radare Jul 16, 2018
Collaborator

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) { ...

@cyanpencil cyanpencil force-pushed the cyanpencil:fix-coverities branch from 5bda075 to 404d971 Jul 16, 2018
@radare
Copy link
Collaborator

@radare radare commented Jul 16, 2018

please rebase. master should be green

@cyanpencil cyanpencil force-pushed the cyanpencil:fix-coverities branch 2 times, most recently from 33b19a1 to 030f0d5 Jul 16, 2018
@cyanpencil cyanpencil force-pushed the cyanpencil:fix-coverities branch from 030f0d5 to d94d803 Jul 16, 2018
@cyanpencil
Copy link
Contributor Author

@cyanpencil cyanpencil commented Jul 16, 2018

Ok finally green now :)

@radare radare merged commit 9639afa into radareorg:master Jul 16, 2018
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants