]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
udptl: Ensure fec[] in udptl_build_packet() is initialized.
authorRussell Bryant <russell@russellbryant.com>
Wed, 14 Mar 2012 23:02:43 +0000 (23:02 +0000)
committerRussell Bryant <russell@russellbryant.com>
Wed, 14 Mar 2012 23:02:43 +0000 (23:02 +0000)
Scan results indicated that this array could be used uninitialized.  At a quick
look, it looks correct.  In any case, initializing it is a Good Thing (tm).
........

Merged revisions 359457 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@359458 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/udptl.c

index 3fc5b5b9e815fd9fc4a9c22170d2979ef83ca76e..95420ce7fabdc1a3bb08690dab7c752c5b19ea28 100644 (file)
@@ -520,7 +520,7 @@ static int udptl_rx_packet(struct ast_udptl *s, uint8_t *buf, unsigned int len)
 
 static int udptl_build_packet(struct ast_udptl *s, uint8_t *buf, unsigned int buflen, uint8_t *ifp, unsigned int ifp_len)
 {
-       uint8_t fec[LOCAL_FAX_MAX_DATAGRAM * 2];
+       uint8_t fec[LOCAL_FAX_MAX_DATAGRAM * 2] = { 0, };
        int i;
        int j;
        int seq;