Author: tsoome
Date: Mon Dec  9 21:10:18 2019
New Revision: 355571
URL: https://svnweb.freebsd.org/changeset/base/355571

Log:
  MFC r355347:
  loader: ReadKeyStrokeEx may return partial keystrokes
  
  In some systems we can receive no scancode nor unicodechar values.
  
  PR:           240760
  Reported by:  Ariel Millennium Thornton

Modified:
  stable/12/stand/efi/libefi/efi_console.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/stand/efi/libefi/efi_console.c
==============================================================================
--- stable/12/stand/efi/libefi/efi_console.c    Mon Dec  9 19:25:15 2019        
(r355570)
+++ stable/12/stand/efi/libefi/efi_console.c    Mon Dec  9 21:10:18 2019        
(r355571)
@@ -558,10 +558,11 @@ efi_readkey_ex(void)
                                        kp->UnicodeChar++;
                                }
                        }
+                       if (kp->ScanCode == 0 && kp->UnicodeChar == 0)
+                               return (false);
+                       keybuf_inschar(kp);
+                       return (true);
                }
-
-               keybuf_inschar(kp);
-               return (true);
        }
        return (false);
 }
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to