laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/31972 )

Change subject: gsm_bts_check_ny1: Prevent possible division by zero
......................................................................

gsm_bts_check_ny1: Prevent possible division by zero

Do this by setting the minimal value for T3105 to 1 in its timer definition.

Fixes: Coverity scan CID#307389
Change-Id: I1fd0b92ab507a58fed6e9649eaa4770f1ad1cbad
---
M src/osmo-bsc/net_init.c
M tests/timer.vty
2 files changed, 15 insertions(+), 3 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified




diff --git a/src/osmo-bsc/net_init.c b/src/osmo-bsc/net_init.c
index 5a7422c..d97fd01 100644
--- a/src/osmo-bsc/net_init.c
+++ b/src/osmo-bsc/net_init.c
@@ -36,7 +36,7 @@
        { .T = 101, .default_val = 10, .desc = "inter-BSC/MSC Handover 
incoming, BSSMAP HO Request to HO Accept" },
        { .T = 3101, .default_val = 3, .desc = "RR Immediate Assignment" },
        { .T = 3103, .default_val = 5, .desc = "Handover" },
-       { .T = 3105, .default_val = GSM_T3105_DEFAULT, .unit = OSMO_TDEF_MS, 
.desc = "Physical Information" },
+       { .T = 3105, .default_val = GSM_T3105_DEFAULT, .min_val = 1, .unit = 
OSMO_TDEF_MS, .desc = "Physical Information" },
        { .T = 3107, .default_val = 5, .desc = "(unused)" },
        { .T = 3109, .default_val = 5, .desc = "RSL SACCH deactivation" },
        { .T = 3111, .default_val = 2, .desc = "Wait time before RSL RF Channel 
Release" },
diff --git a/tests/timer.vty b/tests/timer.vty
index 6d6efe8..e418054 100644
--- a/tests/timer.vty
+++ b/tests/timer.vty
@@ -8,7 +8,7 @@
 net: T101 = 10 s       inter-BSC/MSC Handover incoming, BSSMAP HO Request to 
HO Accept (default: 10 s)
 net: T3101 = 3 s       RR Immediate Assignment (default: 3 s)
 net: T3103 = 5 s       Handover (default: 5 s)
-net: T3105 = 100 ms    Physical Information (default: 100 ms)
+net: T3105 = 100 ms    Physical Information (default: 100 ms, range: [1 .. 
inf])
 net: T3107 = 5 s       (unused) (default: 5 s)
 net: T3109 = 5 s       RSL SACCH deactivation (default: 5 s)
 net: T3111 = 2 s       Wait time before RSL RF Channel Release (default: 2 s)
@@ -64,7 +64,7 @@
 net: T101 = 10 s       inter-BSC/MSC Handover incoming, BSSMAP HO Request to 
HO Accept (default: 10 s)
 net: T3101 = 3 s       RR Immediate Assignment (default: 3 s)
 net: T3103 = 5 s       Handover (default: 5 s)
-net: T3105 = 100 ms    Physical Information (default: 100 ms)
+net: T3105 = 100 ms    Physical Information (default: 100 ms, range: [1 .. 
inf])
 net: T3107 = 5 s       (unused) (default: 5 s)
 net: T3109 = 5 s       RSL SACCH deactivation (default: 5 s)
 net: T3111 = 2 s       Wait time before RSL RF Channel Release (default: 2 s)

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I1fd0b92ab507a58fed6e9649eaa4770f1ad1cbad
Gerrit-Change-Number: 31972
Gerrit-PatchSet: 4
Gerrit-Owner: arehbein <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to