From ffd8f82a52f66c1089aa56b3e842b174eb8ecdca Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Thu, 14 Mar 2013 11:30:54 +0900 Subject: [PATCH] Fix last commit Invalid buffer size --- src/bin/termptyesc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c index d8d62ef..73715f9 100644 --- a/src/bin/termptyesc.c +++ b/src/bin/termptyesc.c @@ -971,7 +971,7 @@ _handle_esc_terminology(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode * cc++; } buf = bufsmall; - if (blen > (int)(sizeof(bufsmall) - 10)) buf = malloc(blen * sizeof(Eina_Unicode) + 10); + if (blen > (int)(sizeof(bufsmall) / sizeof(Eina_Unicode) - 10)) buf = malloc(blen * sizeof(Eina_Unicode) + 10); cc = (Eina_Unicode *)c; b = buf; be = buf + blen;