summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-24 18:14:27 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-24 18:44:15 +0900
commit71cb445b6c1f4dce5eee0b919a525fe1d554ccff (patch)
treee2089008f790806d3e6389ed5cf15e56b1719ed8
parent1c6bb48c11dba18cea927f9dc6b32c54d649fcbb (diff)
elm quicklaunch binary - fix coverity CID 1353607
@fix
-rw-r--r--src/bin/elementary/quicklaunch.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/elementary/quicklaunch.c b/src/bin/elementary/quicklaunch.c
index 4aaaf64c74..83d7d2d4b6 100644
--- a/src/bin/elementary/quicklaunch.c
+++ b/src/bin/elementary/quicklaunch.c
@@ -104,6 +104,11 @@ handle_run(int fd, unsigned long bytes)
104 int argc, envnum; 104 int argc, envnum;
105 unsigned long off; 105 unsigned long off;
106 106
107 if (bytes < 1)
108 {
109 CRI("no bytes to quicklaunch");
110 return;
111 }
107 _elm_startup_time = ecore_time_unix_get(); 112 _elm_startup_time = ecore_time_unix_get();
108 113
109 buf = alloca(bytes); 114 buf = alloca(bytes);
@@ -114,7 +119,7 @@ handle_run(int fd, unsigned long bytes)
114 return; 119 return;
115 } 120 }
116 close(fd); 121 close(fd);
117 if (bytes > 0) buf[bytes - 1] = 0; 122 buf[bytes - 1] = 0;
118 123
119 argc = ((unsigned long *)(buf))[0]; 124 argc = ((unsigned long *)(buf))[0];
120 envnum = ((unsigned long *)(buf))[1]; 125 envnum = ((unsigned long *)(buf))[1];