diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2019-09-23 08:25:19 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2019-09-23 08:25:19 -0700 |
commit | 8026ace54250eba699ad9979586e78d27a7745dc (patch) | |
tree | 3ff40914392988cbb1370de43fde55afa5fe353a | |
parent | 9fe45abd6589dcc501e415926d8aaa3568fb1933 (diff) |
QueryColorMap() function in multiVis.c may retrieve incorrect colours (#3)
Fixes: https://gitlab.freedesktop.org/xorg/app/xwd/issues/3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | multiVis.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -189,7 +189,7 @@ QueryColorMap(Display *disp, Colormap src_cmap, Visual *src_vis, XColor *colors ; ncolors = (unsigned) src_vis->map_entries ; - *src_colors = colors = (XColor *)malloc(ncolors * sizeof(XColor) ) ; + *src_colors = colors = calloc(ncolors, sizeof(XColor)); if(src_vis->class != TrueColor && src_vis->class != DirectColor) { |