From: Luo Xionghu <xionghu....@intel.com>

Signed-off-by: Luo Xionghu <xionghu....@intel.com>
---
 src/cl_utils.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/cl_utils.h b/src/cl_utils.h
index 311ba2a..0934d5f 100644
--- a/src/cl_utils.h
+++ b/src/cl_utils.h
@@ -177,6 +177,11 @@ do {                                                       
 \
   } else {                                                  \
     REGION = PREGION;                                       \
   }                                                         \
+  if((REGION[0] == 0)||(REGION[1] == 0)||(REGION[2] == 0))  \
+  {                                                         \
+    err = CL_INVALID_VALUE;                                 \
+    goto error;                                             \
+  }                                                         \
 } while(0)
 
 #define FIXUP_IMAGE_ORIGIN(IMAGE, PREGION, REGION)          \
-- 
2.1.4

_______________________________________________
Beignet mailing list
Beignet@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to