[1/2] applehttp: Avoid reading uninitialized memory

Message ID 1323887877-20634-1-git-send-email-martin@martin.st
State Committed
Commit c41b9842ceac42bedfd74a7ba2d02add82f818a9
Headers show

Commit Message

Martin Storsjö Dec. 14, 2011, 6:37 p.m.
---
 libavformat/applehttp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Luca Barbato Dec. 14, 2011, 6:45 p.m. | #1
On 14/12/11 19:37, Martin Storsjö wrote:
> ---
>   libavformat/applehttp.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>

Ok.

Patch

diff --git a/libavformat/applehttp.c b/libavformat/applehttp.c
index 7cc0499..19f2b20 100644
--- a/libavformat/applehttp.c
+++ b/libavformat/applehttp.c
@@ -204,7 +204,7 @@  static int parse_playlist(AppleHTTPContext *c, const char *url,
     enum KeyType key_type = KEY_NONE;
     uint8_t iv[16] = "";
     int has_iv = 0;
-    char key[MAX_URL_SIZE];
+    char key[MAX_URL_SIZE] = "";
     char line[1024];
     const char *ptr;
     int close_in = 0;