From bcadde2068563b818a280e40e6189191e10fd371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fonseca?= Date: Thu, 14 Jan 2010 15:07:20 +0000 Subject: pipebuffer: Ensure buffer size/alignment is not zero. --- src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gallium/auxiliary/pipebuffer') diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c index 6e3214c..8f74180 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; -- cgit v1.1