Missing initializer in PJMedia mips_test.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey there,

inside source file 'pjmedia/src/test/mips_test.c' a variable
initialization for 'status' in function wsola_discard_get_frame() is
missing.
This causes the returning of uninitialized data in some cases. As a
consequence the test will fail.

The following patch fixes the bug:

diff --git a/pjmedia/src/test/mips_test.c b/pjmedia/src/test/mips_test.c
index fc71d4f..ac1c6b6 100644
--- a/pjmedia/src/test/mips_test.c
+++ b/pjmedia/src/test/mips_test.c
@@ -1172,7 +1172,7 @@ static pj_status_t
wsola_discard_get_frame(struct pjmedia_port *this_port,
                                           pjmedia_frame *frame)
 {
     struct wsola_discard_port *wp = (struct wsola_discard_port*)this_port;
-    pj_status_t status;
+    pj_status_t status = PJ_SUCCESS;

     while (pjmedia_circ_buf_get_len(wp->circbuf) <
                PJMEDIA_PIA_SPF(&wp->base.info) * (CIRC_BUF_FRAME_CNT-1))


Regards,
Michael

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux