avfilter/avf_abitscope: fix undefined behaviour
authorPaul B Mahol <onemda@gmail.com>
Wed, 16 Oct 2019 16:18:57 +0000 (18:18 +0200)
committerPaul B Mahol <onemda@gmail.com>
Wed, 16 Oct 2019 16:28:32 +0000 (18:28 +0200)
Fixes #8289

libavfilter/avf_abitscope.c

index 6a38521..759f821 100644 (file)
@@ -142,7 +142,7 @@ static void count_bits(AudioBitScopeContext *s, uint32_t sample, int max)
     int i;
 
     for (i = 0; i < max; i++) {
-        if (sample & (1 << i))
+        if (sample & (1U << i))
             s->counter[i]++;
     }
 }