[vlc-commits] http_live: Fix off-by-one.

Rémi Duraffort git at videolan.org
Wed Aug 29 19:06:12 CEST 2012


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Jun 28 20:16:21 2012 +0200| [ea87467e04fb47498f13e15f1e4ce6095129132f] | committer: Rémi Duraffort

http_live: Fix off-by-one.

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

 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 6297b1f..ab075c6 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -530,7 +530,7 @@ static int string_to_IV(char *string_hexa, uint8_t iv[AES_BLOCK_SIZE])
             return VLC_EGENERIC;
     }
 
-    for (int i = 8; i ; --i) {
+    for (int i = 7; i >= 0 ; --i) {
         iv[  i] = iv_hi & 0xff;
         iv[8+i] = iv_lo & 0xff;
         iv_hi >>= 8;



More information about the vlc-commits mailing list