iuup: Explicitly mark default case as unexpected with assert
That code path should not happen since this function is only called for
data frames coming with IUUP_FSM_EVT_IUUP_DATA_IND.
Control frames should come with specific events like
IUUP_FSM_EVT_IUUP_CONFIG_REQ.
Hence, let's add an assert to make sure we early exit if that ever
happens (it shouldn't), instead of carrying on reading uninitialized var
"dt".
Fixes: Coverity CID#272996
Change-Id: Iaeba59bc9ebfe817dbb7528572dc669c010ef14d
diff --git a/src/gsm/iuup.c b/src/gsm/iuup.c
index ca7eb2b..c6a575e 100644
--- a/src/gsm/iuup.c
+++ b/src/gsm/iuup.c
@@ -476,6 +476,8 @@
dt.frame_nr = h1->frame_nr;
dt.fqc = h1->fqc;
break;
+ default:
+ OSMO_ASSERT(0);
}
/* pull up to the IuUP payload and push a new primitive header in front */