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:
579415d
)
Fix faulty check in the VMS version of opt_progname
author
Richard Levitte
<levitte@openssl.org>
Wed, 30 Dec 2015 15:57:05 +0000
(16:57 +0100)
committer
Richard Levitte
<levitte@openssl.org>
Wed, 30 Dec 2015 15:57:05 +0000
(16:57 +0100)
Reviewed-by: Stephen Henson <steve@openssl.org>
apps/opt.c
patch
|
blob
|
history
diff --git
a/apps/opt.c
b/apps/opt.c
index 90a9d84e47c141db7b9f6465ad5fef87f2bf4053..853c981ce6be25b74802692e63baafb1e63c59d6 100644
(file)
--- a/
apps/opt.c
+++ b/
apps/opt.c
@@
-127,7
+127,7
@@
char *opt_progname(const char *argv0)
q = strrchr(p, '.');
strncpy(prog, p, sizeof prog - 1);
prog[sizeof prog - 1] = '\0';
- if (q
== NULL || q - p >=
sizeof prog)
+ if (q
!= NULL && q - p <
sizeof prog)
prog[q - p] = '\0';
return prog;
}