Skip to content

Commit

Permalink
Fix overflow when skipping over raw input (#737)
Browse files Browse the repository at this point in the history
Fixes #655
  • Loading branch information
ktmf01 authored Aug 31, 2024
1 parent 4a271d2 commit d34489c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flac/encode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,7 @@ int flac__encode_file(FILE *infile, FLAC__off_t infilesize, const char *infilena
switch(options.format) {
case FORMAT_RAW:
{
uint32_t skip_bytes = encoder_session.info.bytes_per_wide_sample * (uint32_t)skip;
uint64_t skip_bytes = encoder_session.info.bytes_per_wide_sample * skip;
if(skip_bytes > lookahead_length) {
skip_bytes -= lookahead_length;
lookahead_length = 0;
Expand Down

0 comments on commit d34489c

Please sign in to comment.