diff options
author | nicm <nicm> | 2015-08-24 22:49:13 +0000 |
---|---|---|
committer | nicm <nicm> | 2015-08-24 22:49:13 +0000 |
commit | 3219e0314e3d1d39a57db330faa5693ce0264244 (patch) | |
tree | aac9af749f8cda1fe1291945fc248b732fd33c69 /grid.c | |
parent | 58b659a26e3c558614155ba351e7f275f277e4d3 (diff) | |
download | rtmux-3219e0314e3d1d39a57db330faa5693ce0264244.tar.gz rtmux-3219e0314e3d1d39a57db330faa5693ce0264244.tar.bz2 rtmux-3219e0314e3d1d39a57db330faa5693ce0264244.zip |
In grid_duplicate_lines, if the line is empty (cellsize == 0) then clear
the destination celldata pointer rather than leaving a stale copy of the
source pointer (which may later be freed). Fixes a crash found by
Kuang-che Wu.
Diffstat (limited to 'grid.c')
-rw-r--r-- | grid.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -652,7 +652,8 @@ grid_duplicate_lines(struct grid *dst, u_int dy, struct grid *src, u_int sy, srcl->cellsize, sizeof *dstl->celldata); memcpy(dstl->celldata, srcl->celldata, srcl->cellsize * sizeof *dstl->celldata); - } + } else + dstl->celldata = NULL; sy++; dy++; |