efl/embryo: Let's not overwrite memory here
authorDaniel Willmann <d.willmann@samsung.com>
Mon, 14 Jan 2013 16:42:49 +0000 (16:42 +0000)
committerDaniel Willmann <daniel@totalueberwachung.de>
Mon, 14 Jan 2013 16:42:49 +0000 (16:42 +0000)
Issue found by Klocwork

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
SVN revision: 82767

src/lib/edje/edje_embryo.c

index a8668ee..1697a38 100644 (file)
@@ -3099,7 +3099,7 @@ _edje_embryo_fn_external_param_get_str(Embryo_Program *ep, Embryo_Cell *params)
      {
        char *tmp = alloca(dst_len);
        memcpy(tmp, eep.s, dst_len - 1);
-       tmp[dst_len] = '\0';
+       tmp[dst_len-1] = '\0';
        SETSTR(tmp, params[3]);
      }
    return 1;