https://git.reactos.org/?p=reactos.git;a=commitdiff;h=06abd3b48018981a069b1263f8a716fe16379197

commit 06abd3b48018981a069b1263f8a716fe16379197
Author: Pierre Schweitzer <[email protected]>
AuthorDate: Wed Jan 3 08:47:36 2018 +0100

    [DISKPART] Don't crash on input if user provided no command
    
    CORE-14018
---
 base/system/diskpart/interpreter.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/base/system/diskpart/interpreter.c 
b/base/system/diskpart/interpreter.c
index 4e22a6d646..59f75570ab 100644
--- a/base/system/diskpart/interpreter.c
+++ b/base/system/diskpart/interpreter.c
@@ -69,6 +69,10 @@ InterpretCmd(int argc, LPWSTR *argv)
 {
     PCOMMAND cmdptr;
 
+    /* If no args provided */
+    if (argc < 1)
+        return TRUE;
+
     /* First, determine if the user wants to exit
        or to use a comment */
     if(wcsicmp(argv[0], L"exit") == 0)

Reply via email to