From 6d969c0dec307af61ca5413dbe7e47b25c4157e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 15 Jun 2007 13:32:26 +0200 Subject: Use xine_xcalloc() to make sure nothing will overflow. --- src/video_out/video_out_xcbshm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/video_out/video_out_xcbshm.c b/src/video_out/video_out_xcbshm.c index a7c3b3028..1491832ea 100644 --- a/src/video_out/video_out_xcbshm.c +++ b/src/video_out/video_out_xcbshm.c @@ -965,7 +965,7 @@ static int ImlibPaletteLUTGet(xshm_driver_t *this) { char *retval = xcb_get_property_value(prop_reply); j = 1 + retval[0]*4; - this->yuv2rgb_cmap = malloc(sizeof(uint8_t) * 32 * 32 * 32); + this->yuv2rgb_cmap = xine_xcalloc(sizeof(uint8_t), 32 * 32 * 32); for (i = 0; i < 32 * 32 * 32 && j < num_ret; i++) this->yuv2rgb_cmap[i] = retval[1+4*retval[j++]+3]; -- cgit v1.2.3