tnt has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/26657 )
Change subject: conv: Fix the traceback for tail biting codes
......................................................................
Patch Set 3:
Heh, I don't like the linter comments and it makes it inconsistent with the surrouding code :/
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/26657
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I87e51d3880c0fe7bf3d6cd08fd46517a424a230c
Gerrit-Change-Number: 26657
Gerrit-PatchSet: 3
Gerrit-Owner: tnt <tnt(a)246tNt.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 05 Jan 2022 10:06:06 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
laforge has uploaded a new patch set (#3) to the change originally created by tnt. ( https://gerrit.osmocom.org/c/libosmocore/+/26657 )
Change subject: conv: Fix the traceback for tail biting codes
......................................................................
conv: Fix the traceback for tail biting codes
When picking the end state, looking only at the path metric
is highly suboptimal because in a tail biting code, we _know_ that
whatever treillis path is correct, it must start and end at the same
state. So we only consider path meeting that condition. We know any
path that doesn't isn't the right one. We only fallback to only
path metric if no path met that condition.
Fixes OS#4508
Signed-off-by: Sylvain Munaut <tnt(a)246tNt.com>
Change-Id: I87e51d3880c0fe7bf3d6cd08fd46517a424a230c
---
M include/osmocom/core/conv.h
M src/conv.c
M src/conv_acc.c
3 files changed, 89 insertions(+), 22 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/57/26657/3
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/26657
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I87e51d3880c0fe7bf3d6cd08fd46517a424a230c
Gerrit-Change-Number: 26657
Gerrit-PatchSet: 3
Gerrit-Owner: tnt <tnt(a)246tNt.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/26726 )
Change subject: logging: Fix Not enough tailroom msgb_put in _output_buf callers
......................................................................
logging: Fix Not enough tailroom msgb_put in _output_buf callers
The function clearly specified in its documentation that the number of
bytes written to the out buffer were being returned. However, the value
returned was "the number of characters (excluding the terminating null
byte) which would have been written to the final string if enough space
had been available.", aka snprintf-style.
The 2 callers of that function were not expecting it, so if a long
enough buffer was passed, the program asserted.
Closes: OS#5383
Change-Id: I8d71bd1a0dad37606acb8302b05c2ae338112e57
---
M src/logging.c
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/logging.c b/src/logging.c
index e5c66f2..24b5553 100644
--- a/src/logging.c
+++ b/src/logging.c
@@ -601,7 +601,8 @@
OSMO_SNPRINTF_RET(ret, rem, offset, len);
}
err:
- buf[buf_len-1] = '\0';
+ len = OSMO_MIN(buf_len - 1, len);
+ buf[len] = '\0';
return len;
}
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/26726
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I8d71bd1a0dad37606acb8302b05c2ae338112e57
Gerrit-Change-Number: 26726
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-MessageType: merged