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 |
} |