From: José Fonseca Date: Thu, 14 Jan 2010 15:07:20 +0000 (+0000) Subject: pipebuffer: Ensure buffer size/alignment is not zero. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bcadde2068563b818a280e40e6189191e10fd371;p=mesa.git pipebuffer: Ensure buffer size/alignment is not zero. --- diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c index 6e3214ca9c9..8f74180a111 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c @@ -371,6 +371,9 @@ pb_debug_manager_create_buffer(struct pb_manager *_mgr, struct pb_desc real_desc; pb_size real_size; + assert(size); + assert(desc->alignment); + buf = CALLOC_STRUCT(pb_debug_buffer); if(!buf) return NULL;