History

avformat/rpl: Fix check for negative values

Michael Niedermayer committed 1 year ago

Commit eab65371 parent 1446e371 file · +1 −1Browse files

Unified · Split

libavformat/rpl.c+1−1
@@ -102,7 +102,7 @@ static AVRational read_fps(const char* line, int* error) · 101 unmodified lines
102 line++;102 line++;
103 for (; *line>='0' && *line<='9'; line++) {103 for (; *line>='0' && *line<='9'; line++) {
104 // Truncate any numerator too large to fit into an int64_t104 // Truncate any numerator too large to fit into an int64_t
105 if (num > (INT64_MAX - 9) / 10 || den > INT64_MAX / 10)105 if (num > (INT64_MAX - 9) / 10ULL || den > INT64_MAX / 10ULL)
106 break;106 break;
107 num = 10 * num + (*line - '0');107 num = 10 * num + (*line - '0');
108 den *= 10;108 den *= 10;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t