Fixed prevent Issue 19251 in quicklaunch.c
authorRajeev Ranjan <rajeev.r@samsung.com>
Tue, 8 Nov 2011 10:08:49 +0000 (15:38 +0530)
committerRajeev Ranjan <rajeev.r@samsung.com>
Wed, 9 Nov 2011 05:33:16 +0000 (11:03 +0530)
Change-Id: I70785c5e2e0840e11c064ff1e173046b2debf5cb

src/bin/quicklaunch.c

index 50f26ec..fd1ed7c 100644 (file)
@@ -95,10 +95,10 @@ handle_run(int fd, unsigned long bytes)
    int argc;
 
    buf = alloca(bytes);
-   if (read(fd, buf, bytes) < 0)
+   if (read(fd, buf, bytes) <= 0)
      {
-       close(fd);
-       return;
+        close(fd);
+        return;
      }
    close(fd);
    argc = ((unsigned long *)(buf))[0];