Skip to content

Commit

Permalink
Merge pull request #2347 from kevinbackhouse/quicktimevideo-size-calc
Browse files Browse the repository at this point in the history
Avoid potential integer overflow in QuickTimeVideo::userDataDecoder
  • Loading branch information
kevinbackhouse authored Sep 7, 2022
2 parents 175e609 + bf4f28b commit 2482159
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/quicktimevideo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ void QuickTimeVideo::userDataDecoder(size_t size_external) {

tv = find(userDataReferencetags, Exiv2::toString(buf.data()));

if (size == 0 || (size - 12) <= 0)
if (size <= 12)
break;

else if (equalsQTimeTag(buf, "DcMD") || equalsQTimeTag(buf, "NCDT"))
Expand Down

0 comments on commit 2482159

Please sign in to comment.