Author: mjansen
Date: Sat May 7 10:22:45 2016
New Revision: 71271
URL:
http://svn.reactos.org/svn/reactos?rev=71271&view=rev
Log:
[KBDTOOL] Handle failure to parse scancodes. Patch by Víctor Martínez Calvo. CID 1341307
CORE-11177 #resolve
#comment Thanks!
Modified:
trunk/reactos/sdk/tools/kbdtool/parser.c
Modified: trunk/reactos/sdk/tools/kbdtool/parser.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/tools/kbdtool/parser.c…
==============================================================================
--- trunk/reactos/sdk/tools/kbdtool/parser.c [iso-8859-1] (original)
+++ trunk/reactos/sdk/tools/kbdtool/parser.c [iso-8859-1] Sat May 7 10:22:45 2016
@@ -917,6 +917,14 @@
exit(1);
}
}
+
+ /* Check if we have found any ScanCode in the file */
+
+ if (ScanCodeCount == -1)
+ {
+ printf("No ScanCode found!\n");
+ exit(1);
+ }
/* Process the scan code table */
Entry = &LayoutData->Entry[ScanCodeCount];