projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
6ee893b
)
Fix for coverity (may pass NULL char pointer to strstr)
author
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Sun, 17 Feb 2013 02:52:22 +0000
(21:52 -0500)
committer
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Sun, 17 Feb 2013 02:52:22 +0000
(21:52 -0500)
scripts/jlibtool.c
patch
|
blob
|
history
diff --git
a/scripts/jlibtool.c
b/scripts/jlibtool.c
index
6a9f9a2
..
79463de
100644
(file)
--- a/
scripts/jlibtool.c
+++ b/
scripts/jlibtool.c
@@
-1311,9
+1311,9
@@
static void add_minus_l(count_chars *cc, const char *arg)
char *newarg;
char *name = strrchr(arg, '/');
char *file = strrchr(arg, '.');
- char *lib = strstr(name, "lib");
- if (name !=NULL && file != NULL && lib == name+1) {
+ if ((name != NULL) && (file != NULL) &&
+ (strstr(name, "lib") == (name + 1))) {
*name = '\0';
*file = '\0';
file = name;