Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Dec 2019 18:36:39 +0000 (UTC)
From:      Toomas Soome <tsoome@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r355347 - head/stand/efi/libefi
Message-ID:  <201912031836.xB3Iadwj055484@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912031836.xB3Iadwj055484>