diff options
author | nicm <nicm> | 2014-10-08 17:14:04 +0000 |
---|---|---|
committer | nicm <nicm> | 2014-10-08 17:14:04 +0000 |
commit | 77efcf8bdd14cd19dc445cf6e44bba7af414939c (patch) | |
tree | 7072113ef40d5ef7ac2206e7014b7c510d02fe18 /paste.c | |
parent | 6610e89689de1ba8afe492ad20b541271d39732d (diff) | |
download | rtmux-77efcf8bdd14cd19dc445cf6e44bba7af414939c.tar.gz rtmux-77efcf8bdd14cd19dc445cf6e44bba7af414939c.tar.bz2 rtmux-77efcf8bdd14cd19dc445cf6e44bba7af414939c.zip |
Use xrealloc(NULL, n, m) instead of xmalloc(n * m) to get overflow
check.
Diffstat (limited to 'paste.c')
-rw-r--r-- | paste.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -279,7 +279,7 @@ paste_make_sample(struct paste_buffer *pb, int utf8flag) len = pb->size; if (len > width) len = width; - buf = xmalloc(len * 4 + 4); + buf = xrealloc(NULL, len, 4 + 4); if (utf8flag) used = utf8_strvis(buf, pb->data, len, flags); |