Skip to content

Commit

Permalink
Fix potential overflow in determining the datatype (#4988)
Browse files Browse the repository at this point in the history
  • Loading branch information
lrw04 authored Aug 28, 2023
1 parent 0829fa4 commit 1a61bcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modelbin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Mat ModelBinFromDataReader::load(int w, int type) const
return Mat();
}

unsigned int flag = flag_struct.f0 + flag_struct.f1 + flag_struct.f2 + flag_struct.f3;
unsigned int flag = (int)flag_struct.f0 + flag_struct.f1 + flag_struct.f2 + flag_struct.f3;

if (flag_struct.tag == 0x01306B47)
{
Expand Down

0 comments on commit 1a61bcd

Please sign in to comment.