Skip to content

Commit

Permalink
Fix bug #72407: NULL Pointer Dereference at _gdScaleVert
Browse files Browse the repository at this point in the history
  • Loading branch information
smalyshev committed Jun 19, 2016
1 parent 5b597a2 commit b9ec171
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ext/gd/libgd/gd_interpolation.c
Expand Up @@ -1049,6 +1049,9 @@ static inline void _gdScaleVert (const gdImagePtr pSrc, const unsigned int src_w
}

contrib = _gdContributionsCalc(dst_height, src_height, (double)(dst_height) / (double)(src_height), pSrc->interpolation);
if (contrib == NULL) {
return;
}
/* scale each column */
for (u = 0; u < dst_width - 1; u++) {
_gdScaleCol(pSrc, src_width, pDst, dst_width, dst_height, u, contrib);
Expand Down

0 comments on commit b9ec171

Please sign in to comment.