From b61eaaccc37c8e7842a86bc06dcd0c0dd444e576 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Mon, 25 May 2020 15:39:35 +0200 Subject: amr: fix off-by-one in osmo_amr_bwe_to_oa() The for loop in osmo_amr_bwe_to_oa, that converts the body part of the AMR payload runs one byte too far. This may cause that some of the padding bits in the end are not set to zero. The loop is designed to convert n-1 bytes and the nth byte is done separately at the end. Change-Id: I91e755b83aaac722079879c026d913cc446812d1 --- tests/amr/amr_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/amr/amr_test.c') diff --git a/tests/amr/amr_test.c b/tests/amr/amr_test.c index 2f41fe9..fabf948 100644 --- a/tests/amr/amr_test.c +++ b/tests/amr/amr_test.c @@ -46,7 +46,7 @@ char *oa_amr_samples[] = { "100c1fb967f7f1fdf547bf2e61c060", "0004f89d67f1160935bde1996840", "0004633cc7f0630439ffe0000000", - "0004eb81fc0758973b9edc782552", + "0004eb81fc0758973b9edc782550", "a078ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00fc", /* sample with invalid FT */ "END", }; -- cgit v1.2.3