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

osmith gerrit-no-reply at
Fri Jun 7 08:58:39 UTC 2019

osmith has posted comments on this change. ( )

Change subject: gsm48_decode_bcd_number2: fix ENOSPC edge case

Patch Set 2:


> 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. 
File tests/gsm0408/gsm0408_test.c: 
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. 
PS2, Line 739: 		.dec_buf_lim = 4
> comma is missing
PS2, Line 740: }
> comma is missing

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ie05900aca50cc7fe8a45d17844dbfcd905fd82fe
Gerrit-Change-Number: 14397
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at>
Gerrit-Reviewer: fixeria <axilirator at>
Gerrit-Reviewer: osmith <osmith at>
Gerrit-Reviewer: pespin <pespin at>
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>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list