diff mbox series

[FFmpeg-devel,2/3] avformat/fwse: Remove always false expression

Message ID 20240525111814.2587729-2-michael@niedermayer.cc
State Accepted
Commit 348c3a7ffe0c3aecf35f1a26a9f321a4e608dab7
Headers show
Series [FFmpeg-devel,1/3] avformat/file: check for lseek() failure | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Michael Niedermayer May 25, 2024, 11:18 a.m. UTC
Fixes: CID1460758 Operands don't affect result

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavformat/fwse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer June 2, 2024, 7:04 p.m. UTC | #1
On Sat, May 25, 2024 at 01:18:13PM +0200, Michael Niedermayer wrote:
> Fixes: CID1460758 Operands don't affect result
> 
> Sponsored-by: Sovereign Tech Fund
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavformat/fwse.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply

[...]
diff mbox series

Patch

diff --git a/libavformat/fwse.c b/libavformat/fwse.c
index 6c1103da146..dc4750d946a 100644
--- a/libavformat/fwse.c
+++ b/libavformat/fwse.c
@@ -67,7 +67,7 @@  static int fwse_read_header(AVFormatContext *s)
     av_channel_layout_default(&par->ch_layout, channels);
     st->duration = avio_rl32(pb);
     par->sample_rate = avio_rl32(pb);
-    if (par->sample_rate <= 0 || par->sample_rate > INT_MAX)
+    if (par->sample_rate <= 0)
         return AVERROR_INVALIDDATA;
 
     par->block_align = 1;