[vlc-commits] HLS: fix a signed comparison warning

Jean-Baptiste Kempf git at videolan.org
Mon May 21 16:52:26 CEST 2012


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon May 21 16:51:34 2012 +0200| [a5b0a06c3a8a6c6276e172174405b40e6678b2a1] | committer: Jean-Baptiste Kempf

HLS: fix a signed comparison warning

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a5b0a06c3a8a6c6276e172174405b40e6678b2a1
---

 modules/stream_filter/httplive.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
index 86f97b6..413247a 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -210,7 +210,7 @@ static bool isHTTPLiveStreaming(stream_t *s)
         for (size_t i = 0; i < ARRAY_SIZE(ext); i++)
         {
             size_t len = strlen(ext[i]);
-            if (size < len)
+            if (size < 0 || (size_t)size < len)
                 continue;
             if (!memcmp(peek, ext[i], len))
                 return true;



More information about the vlc-commits mailing list