summaryrefslogtreecommitdiff
path: root/src/bin/evas
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2013-09-25 18:57:04 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2013-10-28 15:47:15 +0900
commitf18b71d5155e50ae1f494abe11813ac292e53e1d (patch)
tree372a7a0c2ccde89853e364b50c440f430d61c38b /src/bin/evas
parentc5ecf6e5d1f0c43cce569898cb477825b3c88b58 (diff)
evas/cserve2: Fix invalid file referencing in client
Fixes elementary_test "Bg Image": - Various load_opts (jpeg geometry) where not handled properly by the client.
Diffstat (limited to 'src/bin/evas')
-rw-r--r--src/bin/evas/evas_cserve2_slave.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/bin/evas/evas_cserve2_slave.c b/src/bin/evas/evas_cserve2_slave.c
index 43fc3a5b19..7aeac6b370 100644
--- a/src/bin/evas/evas_cserve2_slave.c
+++ b/src/bin/evas/evas_cserve2_slave.c
@@ -434,8 +434,8 @@ image_load(const char *file, const char *key, const char *shmfile,
434 } 434 }
435 435
436 memset(&property, 0, sizeof (property)); 436 memset(&property, 0, sizeof (property));
437 property.w = params->w; 437 property.w = params->opts.w; // Should we rather use params->w ?
438 property.h = params->h; 438 property.h = params->opts.h;
439 439
440 skey = eina_stringshare_add(key); 440 skey = eina_stringshare_add(key);
441 loader_data = _image_file_open(fd, skey, opts, module, &property, &animated, &funcs); 441 loader_data = _image_file_open(fd, skey, opts, module, &property, &animated, &funcs);
@@ -446,6 +446,14 @@ image_load(const char *file, const char *key, const char *shmfile,
446 goto done; 446 goto done;
447 } 447 }
448 448
449 if (params->shm.mmap_size < (int) (property.w * property.h * 4))
450 {
451 printf("LOAD failed at %s:%d: shm map is too small (%d) for this image (%ux%u)\n",
452 __FUNCTION__, __LINE__,
453 params->shm.mmap_size, property.w , property.h);
454 goto done;
455 }
456
449 ok = funcs->file_data(loader_data, &property, map, &error); 457 ok = funcs->file_data(loader_data, &property, map, &error);
450 if (!ok || (error != EVAS_LOAD_ERROR_NONE)) 458 if (!ok || (error != EVAS_LOAD_ERROR_NONE))
451 { 459 {