Skip to content

Commit b9ec171

Browse files
committed
Fix bug #72407: NULL Pointer Dereference at _gdScaleVert
1 parent 5b597a2 commit b9ec171

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/gd/libgd/gd_interpolation.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,6 +1049,9 @@ static inline void _gdScaleVert (const gdImagePtr pSrc, const unsigned int src_w
10491049
}
10501050

10511051
contrib = _gdContributionsCalc(dst_height, src_height, (double)(dst_height) / (double)(src_height), pSrc->interpolation);
1052+
if (contrib == NULL) {
1053+
return;
1054+
}
10521055
/* scale each column */
10531056
for (u = 0; u < dst_width - 1; u++) {
10541057
_gdScaleCol(pSrc, src_width, pDst, dst_width, dst_height, u, contrib);

0 commit comments

Comments
 (0)