fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/33411 )


Change subject: coding: fix a copy-paste bug in gsm0503_tch_afs_decode_dtx()
......................................................................

coding: fix a copy-paste bug in gsm0503_tch_afs_decode_dtx()

According to 3GPP TS 45.003, section 3.9.2, the convolutional coding
is *not* employed in the case of SID_FIRST.  This is why we're using
sid_first_dummy[] in this function.

The conv[] array is not initialized in the case of AFS_SID_FIRST and
passing it to tch_amr_reassemble() is highly likely a copy-paste bug.
Pass the sid_first_dummy[] instead.

Change-Id: Ic8bfc34ce9d14821fe4e82932325f0c517d443a1
Fixes: CID#272949 "Uninitialized scalar variable"
---
M src/coding/gsm0503_coding.c
1 file changed, 19 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/11/33411/1

diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c
index 80286f7..286981e 100644
--- a/src/coding/gsm0503_coding.c
+++ b/src/coding/gsm0503_coding.c
@@ -2262,7 +2262,7 @@
                        tch_amr_sid_update_append(sid_first_dummy, 0,
                                                  (codec_mode_req) ? codec[*ft]
                                                  : codec[id > 0 ? id : 0]);
-                       tch_amr_reassemble(tch_data, conv, 39);
+                       tch_amr_reassemble(tch_data, sid_first_dummy, 39);
                        len = 5;
                        goto out;
                case AFS_SID_UPDATE: /* TODO: parse CMI _and_ CMC/CMR (16 + 16 
bit) */

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33411
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ic8bfc34ce9d14821fe4e82932325f0c517d443a1
Gerrit-Change-Number: 33411
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanits...@sysmocom.de>
Gerrit-MessageType: newchange

Reply via email to