Change in ...libosmocore[master]: gsm48_decode_bcd_number2: fix ENOSPC edge case

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

osmith gerrit-no-reply at lists.osmocom.org
Fri Jun 7 08:58:39 UTC 2019


osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/14397 )

Change subject: gsm48_decode_bcd_number2: fix ENOSPC edge case
......................................................................


Patch Set 2:

(3 comments)

> I recommend to extend the unit test first, so you could show the problem in the expected output, and then the fix in a separate change.

Okay. Patch set 3 will only contain the added test case, showing that the actual output (0) differs from the expected output (-ENOSPC).

Patch set 4 will contain both the test case and the fix.

https://gerrit.osmocom.org/#/c/14397/2/tests/gsm0408/gsm0408_test.c 
File tests/gsm0408/gsm0408_test.c:

https://gerrit.osmocom.org/#/c/14397/2/tests/gsm0408/gsm0408_test.c@739 
PS2, Line 739: .dec_buf_lim = 4
> Also, the actual strlen(dec_ascii) is 3. There is no truncation with 4. […]
The input for the decoder is 022143, which is "1234". dec_ascii contains "123\0" after the decoding function ran, because dec_buf_lim is 4.

But I understand what you mean, the title of the test is wrong, I'll fix it in an update.


https://gerrit.osmocom.org/#/c/14397/2/tests/gsm0408/gsm0408_test.c@739 
PS2, Line 739: 		.dec_buf_lim = 4
> comma is missing
Done


https://gerrit.osmocom.org/#/c/14397/2/tests/gsm0408/gsm0408_test.c@740 
PS2, Line 740: }
> comma is missing
Done



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ie05900aca50cc7fe8a45d17844dbfcd905fd82fe
Gerrit-Change-Number: 14397
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Fri, 07 Jun 2019 08:58:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <axilirator at gmail.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190607/7ab09f58/attachment.htm>


More information about the gerrit-log mailing list