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 /grid.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 'grid.c')
-rw-r--r-- | grid.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -724,7 +724,8 @@ grid_reflow_split(struct grid *dst, u_int *py, struct grid_line *src_gl, to_copy = src_gl->cellsize; /* Expand destination line. */ - dst_gl->celldata = xmalloc(to_copy * sizeof *dst_gl->celldata); + dst_gl->celldata = xrealloc(NULL, to_copy, + sizeof *dst_gl->celldata); dst_gl->cellsize = to_copy; dst_gl->flags |= GRID_LINE_WRAPPED; |