projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f22ff0e
)
Check suffixes properly.
author
Dr. Stephen Henson
<steve@openssl.org>
Fri, 22 Jul 2016 00:09:04 +0000
(
01:09
+0100)
committer
Dr. Stephen Henson
<steve@openssl.org>
Fri, 22 Jul 2016 11:07:13 +0000
(12:07 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
apps/rehash.c
patch
|
blob
|
history
diff --git
a/apps/rehash.c
b/apps/rehash.c
index ee362b5fbdcf5015bdf924b620b39fc0128fbb38..443c15e13c6b2cc6fb8ed22bc580b692475cc445 100644
(file)
--- a/
apps/rehash.c
+++ b/
apps/rehash.c
@@
-174,9
+174,11
@@
static int handle_symlink(const char *filename, const char *fullpath)
}
if (filename[i++] != '.')
return -1;
- for (type = OSSL_NELEM(suffixes) - 1; type > 0; type--)
- if (strcasecmp(suffixes[type], &filename[i]) == 0)
+ for (type = OSSL_NELEM(suffixes) - 1; type > 0; type--) {
+ const char *suffix = suffixes[type];
+ if (strncasecmp(suffix, &filename[i], strlen(suffix)) == 0)
break;
+ }
i += strlen(suffixes[type]);
id = strtoul(&filename[i], &endptr, 10);