提交 ce7a2232 编写于 作者: R Rich Salz

Check for bad filename in evp_test

Thanks to Brian Carpter for reporting this.
Reviewed-by: NDr. Stephen Henson <steve@openssl.org>
上级 721f3980
......@@ -559,6 +559,10 @@ int main(int argc, char **argv)
memset(&t, 0, sizeof(t));
t.start_line = -1;
in = BIO_new_file(argv[1], "r");
if (in == NULL) {
fprintf(stderr, "Can't open %s for reading\n", argv[1]);
return 1;
}
t.in = in;
while (BIO_gets(in, buf, sizeof(buf))) {
t.line++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册