Skip to content

Commit

Permalink
fix scan num limitation.
Browse files Browse the repository at this point in the history
Signed-off-by: caij jianxing.cai@intel.com
  • Loading branch information
Dylan-debug authored and XinfengZhang committed Mar 28, 2023
1 parent 954bad9 commit f05bcdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion decode/tinyjpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ int tinyjpeg_decode(struct jdec_private *priv)
vaDestroyConfig(va_dpy, config_id);
vaDestroyContext(va_dpy, context_id);

if (scan_num > JPEG_SCAN_MAX)
if (scan_num >= JPEG_SCAN_MAX)
break;
parse_JFIF(priv, priv->stream);
if (priv->width[scan_num] == 0 && priv->height[scan_num] == 0)
Expand Down

0 comments on commit f05bcdb

Please sign in to comment.