summaryrefslogtreecommitdiff
path: root/src/bin/evas/dummy_slave.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2013-10-29 13:54:15 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2013-10-29 15:08:14 +0900
commit10f80df01825066987452b11a9ec785555540c64 (patch)
tree0c3638f3c40ddca5f80b64e20f414d97c10a5c6d /src/bin/evas/dummy_slave.c
parent73c2ae44e0ae7404c64e2da1c0220301392a2220 (diff)
evas/cserve2: Fix new Coverity issues
Nothing extraordinary here. Most potential crashes are extremely unlikely. - Fix CID 1113444 - Fix CID 1113442 - Fix CID 1113441 (Logically dead code, can not be NULL) - Fix CID 1113440: Explicit null dereferenced This is actually an impossible situation. Fixed by checking for nullity and printing out some error messages instead of just crashing. - Fix CID 1113439: Dereference after null check Logically impossible code as both idxpath and datapath must be either set or null at the same time. Change the if logic to tell Coverity there's no bug. - Fix CID 1113438 (Argument cannot be negative) Fix wrong check of return value from shm_open. - Fix CID 1113437 (Argument cannot be negative) Fix wrong check of return value from shm_open. - Fix CID 1113436 (Dereference null return value) This case really shouldn't happen. But the extra check does not hurt. - Fix CID 1113435 (Dereference before null check) Check for nullity after map open. - Fix CID 1113434 (Extra sizeof expression) Debug buggy debug tool :) - Fix CID 1113433 (Uninitialized scalar variable) Insignificant issue: only prints wrong debug logs :) - Fix CID 1113431 (Uninitialized scalar value) Check if (!found) only to print out logs. Not a big deal if found was invalid. - Fix CID 1039462 (Logically dead code)
Diffstat (limited to 'src/bin/evas/dummy_slave.c')
-rw-r--r--src/bin/evas/dummy_slave.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/evas/dummy_slave.c b/src/bin/evas/dummy_slave.c
index a64ec53d90..9b5638053b 100644
--- a/src/bin/evas/dummy_slave.c
+++ b/src/bin/evas/dummy_slave.c
@@ -170,7 +170,7 @@ int main(int c, char **v)
170 Error_Type err; 170 Error_Type err;
171 const char *file, *key; 171 const char *file, *key;
172 p = params; 172 p = params;
173 file = (const char *)(p + sizeof(*p)); 173 file = (const char *)(p + 1);
174 key = file + strlen(file) + 1; 174 key = file + strlen(file) + 1;
175 if ((err = image_open(file, key, &result)) != CSERVE2_NONE) 175 if ((err = image_open(file, key, &result)) != CSERVE2_NONE)
176 error_send(wfd, err); 176 error_send(wfd, err);