summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2014-12-17 17:48:51 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-12-17 17:49:07 +0900
commitc8a993d1f77087750518a2684b151870f5e76651 (patch)
tree9e7ee6e7b27177f94cb82c965d5e29b64785dc8e /src
parent98b32bcea52fc3e641eefe13aae6299a34f52ede (diff)
evas - generic loaders - fix possible string overflow on decoders
Summary: fix possible string overflow on decoders. this commit is based on commit 3c5412f72879bbce72bfbc7190acd9e5d16d3b46 that fixes CID 1039580. Reviewers: raster Reviewed By: raster Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1783
Diffstat (limited to 'src')
-rw-r--r--src/modules/evas/loaders/generic/evas_image_load_generic.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/evas/loaders/generic/evas_image_load_generic.c b/src/modules/evas/loaders/generic/evas_image_load_generic.c
index 22d0acde27..78488d1036 100644
--- a/src/modules/evas/loaders/generic/evas_image_load_generic.c
+++ b/src/modules/evas/loaders/generic/evas_image_load_generic.c
@@ -173,7 +173,8 @@ _load(Eina_File *ef, const char *key,
173 // single extn not too long 173 // single extn not too long
174 if (((end - dot1) <= 5) && (!illegal_char(dot1))) 174 if (((end - dot1) <= 5) && (!illegal_char(dot1)))
175 { 175 {
176 strcpy(&(decoders[decoders_num][0]), img_loader); 176 strncpy(&(decoders[decoders_num][0]), img_loader, 127);
177 decoders[decoders_num][127] = 0;
177 dotcat(&(decoders[decoders_num][0]), dot1); 178 dotcat(&(decoders[decoders_num][0]), dot1);
178 decoders_num++; 179 decoders_num++;
179 } 180 }