[PIPEREAD]
authorPierre Schweitzer <pierre@reactos.org>
Sat, 3 May 2014 18:52:00 +0000 (18:52 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sat, 3 May 2014 18:52:00 +0000 (18:52 +0000)
Prevent null buffer dereference

svn path=/trunk/; revision=63139

reactos/tools/pipetools/piperead.cpp

index 3ab4c4c..6359335 100644 (file)
@@ -196,8 +196,8 @@ int main(int argc, char** argv)
        case 3:
                clientMode = *++argv;
                if (strcmp(clientMode,"-c") != 0) {
-                       clientMode = NULL;
                        fprintf(stderr,"Invalid option: %s\n", clientMode);
+                       clientMode = NULL;
                        res = -6;
                }
                //fall through