Found while reviewing code related to CID1604409 Overflowed return value
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -424,6 +424,8 @@ static inline int get_ur_golomb(GetBitContext *gb, int k, int limit, · 423 unmodified lines | ||
| 424 | 424 | |
| 425 | 425 | /** |
| 426 | 426 | * read unsigned golomb rice code (jpegls). |
| 427 | + * | |
| 428 | + * @returns -1 on error | |
| 427 | 429 | */ |
| 428 | 430 | static inline int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit, |
| 429 | 431 | int esc_len) |
| @@ -535,6 +537,8 @@ static inline int get_sr_golomb(GetBitContext *gb, int k, int limit, · 105 unmodified lines | ||
| 535 | 537 | |
| 536 | 538 | /** |
| 537 | 539 | * read signed golomb rice code (flac). |
| 540 | + * | |
| 541 | + * @returns INT_MIN on error | |
| 538 | 542 | */ |
| 539 | 543 | static inline int get_sr_golomb_flac(GetBitContext *gb, int k, int limit, |
| 540 | 544 | int esc_len) |