Commit 6b051c4e authored by Lutz Jänicke's avatar Lutz Jänicke
Browse files

Catch error condition to prevent NULL pointer dereference.

Submitted by: Goetz Babin-Ebell <babin-ebell@trustcenter.de>

PR: #766
parent a601df36
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -501,7 +501,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;
@@ -525,7 +525,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: