svn commit: r355347 - head/stand/efi/libefi

Toomas Soome tsoome at FreeBSD.org
Tue Dec 3 18:36:39 UTC 2019


Author: tsoome
Date: Tue Dec  3 18:36:39 2019
New Revision: 355347
URL: https://svnweb.freebsd.org/changeset/base/355347

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

Modified:
  head/stand/efi/libefi/efi_console.c

Modified: head/stand/efi/libefi/efi_console.c
==============================================================================
--- head/stand/efi/libefi/efi_console.c	Tue Dec  3 18:28:39 2019	(r355346)
+++ head/stand/efi/libefi/efi_console.c	Tue Dec  3 18:36:39 2019	(r355347)
@@ -1126,10 +1126,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);
 }


More information about the svn-src-head mailing list