Fix UI_get0_action_string()
authorRichard Levitte <levitte@openssl.org>
Fri, 10 Mar 2017 23:54:52 +0000 (00:54 +0100)
committerRichard Levitte <levitte@openssl.org>
Sat, 11 Mar 2017 00:25:06 +0000 (01:25 +0100)
It shouldn't try to return an action description for UIT_PROMPT type
UI strings.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2904)

crypto/ui/ui_lib.c

index ceda7e934f7691b2ca3a824af4b02f9bed9edd38..7f30a5b0af768174c04f9f391f1f05f87004f153 100644 (file)
@@ -724,9 +724,9 @@ const char *UI_get0_output_string(UI_STRING *uis)
 const char *UI_get0_action_string(UI_STRING *uis)
 {
     switch (uis->type) {
-    case UIT_PROMPT:
     case UIT_BOOLEAN:
         return uis->_.boolean_data.action_desc;
+    case UIT_PROMPT:
     case UIT_NONE:
     case UIT_VERIFY:
     case UIT_INFO: