]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Coverity reported an Uninitialized pointer read. Upon further digging it appears...
authorWilliam King <william.king@quentustech.com>
Sun, 19 May 2013 00:34:16 +0000 (17:34 -0700)
committerWilliam King <william.king@quentustech.com>
Sun, 19 May 2013 00:35:07 +0000 (17:35 -0700)
src/mod/applications/mod_spandsp/udptl.c

index b560410b7d3efd1cd5adbef251e0629335afcca0..7d72cc16e9a77248cb7bdc99d440162bbcb1bc5c 100644 (file)
@@ -74,6 +74,10 @@ static int decode_open_type(const uint8_t *buf, int limit, int *len, const uint8
                        if ((*len + octet_cnt) > limit)
                                return -1;
 
+                       /* Was told the buffer was large enough, but in reality it didn't exist. FS-5202 */
+                       if ( buf[*len] == NULL )
+                         return -1;
+
                        *pbuf = &buf[*len];
                        *len += octet_cnt;
                }
@@ -159,7 +163,7 @@ int udptl_rx_packet(udptl_state_t *s, const uint8_t buf[], int len)
        const uint8_t *data;
        int msg_len;
        int repaired[16];
-       const uint8_t *bufs[16];
+       const uint8_t *bufs[16] = {0};
        int lengths[16];
        int span;
        int entries;