From cd3c429900f23fb988dd7ea823d64be2f8bf7dc0 Mon Sep 17 00:00:00 2001 From: hermet Date: Wed, 30 Nov 2011 00:16:36 +0000 Subject: [PATCH] elementary/quicklaunch - [E-devel] [Patch] quicklaunch patch 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 Signed-Off-By: PRINCE KUMAR DUBEY Signed-Off-By: ChunEon Park git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@65699 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/bin/quicklaunch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/quicklaunch.c b/src/bin/quicklaunch.c index 50f26ec..fd1ed7c 100644 --- a/src/bin/quicklaunch.c +++ b/src/bin/quicklaunch.c @@ -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]; -- 2.7.4