flite: fix off by one in channel mask building
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Tue, 8 Apr 2014 16:34:13 +0000 (17:34 +0100)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Tue, 8 Apr 2014 16:35:37 +0000 (17:35 +0100)
The first loop would shift 1 by 64, which is either undefined
or implementation defined, instead of clearing the top bit.

Coverity 1197691

ext/flite/gstflitetestsrc.c

index 5d7e1f1..b6c5667 100644 (file)
@@ -189,7 +189,7 @@ gst_flite_test_src_fixate (GstBaseSrc * bsrc, GstCaps * caps)
     gst_structure_remove_field (structure, "channel-mask");
   } else {
     guint64 channel_mask = 0;
-    gint x = 64;
+    gint x = 63;
 
     if (!gst_structure_get (structure, "channel-mask", GST_TYPE_BITMASK,
             &channel_mask, NULL)) {