Package: gst-plugins-good1.0 / 1.4.4-2+deb8u3

flxdec-fix-some-warnings-comparing-unsigned-0.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
From fec77de8cbb0c8192b77aff2e563705ba421f2f2 Mon Sep 17 00:00:00 2001
From: Matthew Waters <matthew@centricular.com>
Date: Tue, 22 Nov 2016 23:46:00 +1100
Subject: [PATCH] flxdec: fix some warnings comparing unsigned < 0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

bf43f44fcfada5ec4a3ce60cb374340486fe9fac was comparing an unsigned
expression to be < 0 which was always false.

gstflxdec.c: In function ‘flx_decode_brun’:
gstflxdec.c:322:33: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
         if ((glong) row - count < 0) {
                                 ^
gstflxdec.c:332:33: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
         if ((glong) row - count < 0) {
                                 ^

https://bugzilla.gnome.org/show_bug.cgi?id=774834
---
 gst/flx/gstflxdec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: gst-plugins-good1.0-1.4.4/gst/flx/gstflxdec.c
===================================================================
--- gst-plugins-good1.0-1.4.4.orig/gst/flx/gstflxdec.c
+++ gst-plugins-good1.0-1.4.4/gst/flx/gstflxdec.c
@@ -317,7 +317,7 @@ flx_decode_brun (GstFlxDec * flxdec, guc
       if (count > 0x7f) {
         /* literal run */
         count = 0x100 - count;
-        if ((glong) row - count < 0) {
+        if ((glong) row - (glong) count < 0) {
           GST_ERROR_OBJECT (flxdec, "Invalid BRUN packet detected.");
           return FALSE;
         }
@@ -327,7 +327,7 @@ flx_decode_brun (GstFlxDec * flxdec, guc
           *dest++ = *data++;
 
       } else {
-        if ((glong) row - count < 0) {
+        if ((glong) row - (glong) count < 0) {
           GST_ERROR_OBJECT (flxdec, "Invalid BRUN packet detected.");
           return FALSE;
         }