提交 211a68b4 编写于 作者: R Richard Levitte

Fix faulty check in the VMS version of opt_progname

Reviewed-by: NStephen Henson <steve@openssl.org>
上级 579415de
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册