Fix last commit

Invalid buffer size
This commit is contained in:
Jean-Philippe Andre 2013-03-14 11:30:54 +09:00 committed by Cedric BAIL
parent 3223e32949
commit ffd8f82a52
1 changed files with 1 additions and 1 deletions

View File

@ -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;