summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2013-01-14 17:07:44 +0000
committerDaniel Willmann <daniel@totalueberwachung.de>2013-01-14 17:07:44 +0000
commitd2a6e45c8020efdb942be330dfbbb625a30f9e43 (patch)
tree52795ac4476d2495b921d7055cef14e7549a6f26
parenta264f9c7c46fdde5018477bcc6e539c89965aadb (diff)
edje: More off-by-one issues from Klocwork
Signed-off-by-one: Daniel Willmann <d.willmann@samsung.com> SVN revision: 82770
-rw-r--r--ChangeLog2
-rw-r--r--src/lib/edje/edje_embryo.c2
-rw-r--r--src/lib/edje/edje_program.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 63da5f1056..9dc2bf7e4d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,6 @@
12013-01-14 Daniel Willmann 12013-01-14 Daniel Willmann
2 2
3 * edje_embryo: Fix off-by-one error 3 * edje: Fix off-by-one errors when using alloca in various functions
4 4
52013-01-14 Tom Hacohen (TAsn) 52013-01-14 Tom Hacohen (TAsn)
6 6
diff --git a/src/lib/edje/edje_embryo.c b/src/lib/edje/edje_embryo.c
index 1697a3886c..ff5a4a9333 100644
--- a/src/lib/edje/edje_embryo.c
+++ b/src/lib/edje/edje_embryo.c
@@ -3200,7 +3200,7 @@ _edje_embryo_fn_external_param_get_choice(Embryo_Program *ep, Embryo_Cell *param
3200 { 3200 {
3201 char *tmp = alloca(dst_len); 3201 char *tmp = alloca(dst_len);
3202 memcpy(tmp, eep.s, dst_len - 1); 3202 memcpy(tmp, eep.s, dst_len - 1);
3203 tmp[dst_len] = '\0'; 3203 tmp[dst_len-1] = '\0';
3204 SETSTR(tmp, params[3]); 3204 SETSTR(tmp, params[3]);
3205 } 3205 }
3206 return 1; 3206 return 1;
diff --git a/src/lib/edje/edje_program.c b/src/lib/edje/edje_program.c
index f1e8a772d2..e4d9e81a40 100644
--- a/src/lib/edje/edje_program.c
+++ b/src/lib/edje/edje_program.c
@@ -1139,7 +1139,7 @@ _edje_emit_full(Edje *ed, const char *sig, const char *src, void *data, void (*f
1139 { 1139 {
1140 char *tmp; 1140 char *tmp;
1141 1141
1142 tmp = alloca(end - idx - 1); 1142 tmp = alloca(end - idx);
1143 memcpy(tmp, idx + 1, end - idx - 1); 1143 memcpy(tmp, idx + 1, end - idx - 1);
1144 tmp[end - idx - 1] = '\0'; 1144 tmp[end - idx - 1] = '\0';
1145 *idx = '\0'; 1145 *idx = '\0';