mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
Fix faulty check in the VMS version of opt_progname
Reviewed-by: Stephen Henson <steve@openssl.org>
This commit is contained in:
parent
579415de54
commit
211a68b41a
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user