elementary/quicklaunch - [E-devel] [Patch] quicklaunch patch
authorhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 30 Nov 2011 00:16:36 +0000 (00:16 +0000)
committerhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 30 Nov 2011 00:16:36 +0000 (00:16 +0000)
a. Fix to handle the condition when read returns 0 and the content of buf is uninitialized in function handle_run inside file "src/bin/quicklaunch.c".
b. Indentation correction in function handle_run around the location of fix above.

Signed-Off-By: RAJEEV RANJAN <rajeev.r@samsumg.com>
Signed-Off-By: PRINCE KUMAR DUBEY <prince.dubey@samsung.com>
Signed-Off-By: ChunEon Park <hermet@hermet.pe.kr>
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@65699 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

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];