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:
fda5e38
)
Catch error condition to prevent NULL pointer dereference.
author
Lutz Jänicke
<jaenicke@openssl.org>
Sun, 16 Nov 2003 16:30:39 +0000
(16:30 +0000)
committer
Lutz Jänicke
<jaenicke@openssl.org>
Sun, 16 Nov 2003 16:30:39 +0000
(16:30 +0000)
Submitted by: Goetz Babin-Ebell <babin-ebell@trustcenter.de>
PR: #766
apps/apps.c
patch
|
blob
|
history
diff --git
a/apps/apps.c
b/apps/apps.c
index b1916bbc0f6228756f0c0786a75657ae58f6fce9..62fa21d5d0babc838cbfe2ad918d6db00428b201 100644
(file)
--- a/
apps/apps.c
+++ b/
apps/apps.c
@@
-475,7
+475,7
@@
static int ui_read(UI *ui, UI_STRING *uis)
{
const char *password =
((PW_CB_DATA *)UI_get0_user_data(ui))->password;
- if (password[0] != '\0')
+ if (password
&& password
[0] != '\0')
{
UI_set_result(ui, uis, password);
return 1;
@@
-499,7
+499,7
@@
static int ui_write(UI *ui, UI_STRING *uis)
{
const char *password =
((PW_CB_DATA *)UI_get0_user_data(ui))->password;
- if (password[0] != '\0')
+ if (password
&& password
[0] != '\0')
return 1;
}
default: