View | Details | Raw Unified | Return to bug 196119
Collapse All | Expand All

(-)files/patch-CVE-2014-8092-3-4 (-1 / +1 lines)
Lines 119-125 Link Here
119
-        if (((_size) > 1) && ((_pReg)->data =
119
-        if (((_size) > 1) && ((_pReg)->data =
120
-                              (RegDataPtr) malloc(RegionSizeof(_size)))) {
120
-                              (RegDataPtr) malloc(RegionSizeof(_size)))) {
121
+        if (((_size) > 1) && ((rgnSize = RegionSizeof(_size)) > 0) &&
121
+        if (((_size) > 1) && ((rgnSize = RegionSizeof(_size)) > 0) &&
122
+            (((_pReg)->data = malloc(rgnSize)) != NULL)) {
122
+            (((_pReg)->data = (RegDataPtr) malloc(rgnSize)) != NULL)) {
123
             (_pReg)->data->size = (_size);
123
             (_pReg)->data->size = (_size);
124
             (_pReg)->data->numRects = 0;
124
             (_pReg)->data->numRects = 0;
125
         }
125
         }

Return to bug 196119