Commit 452f6329 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'af68a2ba'

* commit 'af68a2ba':
  au: use %u when printing id and channels since they are unsigned
  au: validate sample rate
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents be894d6c af68a2ba
......@@ -100,7 +100,7 @@ static int au_read_header(AVFormatContext *s)
codec = ff_codec_get_id(codec_au_tags, id);
if (codec == AV_CODEC_ID_NONE) {
av_log_ask_for_sample(s, "unknown or unsupported codec tag: %d\n", id);
av_log_ask_for_sample(s, "unknown or unsupported codec tag: %u\n", id);
return AVERROR_PATCHWELCOME;
}
......@@ -111,7 +111,12 @@ static int au_read_header(AVFormatContext *s)
}
if (channels == 0 || channels >= INT_MAX / (BLOCK_SIZE * bps >> 3)) {
av_log(s, AV_LOG_ERROR, "Invalid number of channels %d\n", channels);
av_log(s, AV_LOG_ERROR, "Invalid number of channels %u\n", channels);
return AVERROR_INVALIDDATA;
}
if (rate == 0 || rate > INT_MAX) {
av_log(s, AV_LOG_ERROR, "Invalid sample rate: %u\n", rate);
return AVERROR_INVALIDDATA;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment