[PATCH] libosmocore[master]: lapd_core: Fix crash in lapd_dl_flush_hist()

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Jul 31 22:27:49 UTC 2016


Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/632

to look at the new patch set (#2).

lapd_core: Fix crash in lapd_dl_flush_hist()

When lapd_dl_flush_hist() was called before we actually had started a
transmit history from lapd_dl_init(), we woul segfault before this
patch.

Change-Id: Ifa677c9b335dd2884b4f3e44699d901957a0500b
---
M src/gsm/lapd_core.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/32/632/2

diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c
index fd1e709..fd163c8 100644
--- a/src/gsm/lapd_core.c
+++ b/src/gsm/lapd_core.c
@@ -158,7 +158,7 @@
 {
 	unsigned int i;
 
-	if (!dl->range_hist)
+	if (!dl->range_hist || !dl->tx_hist)
 		return;
 
 	for (i = 0; i < dl->range_hist; i++) {

-- 
To view, visit https://gerrit.osmocom.org/632
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ifa677c9b335dd2884b4f3e44699d901957a0500b
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list