gtp: Fix uninitialized var if no extension flags set in gtp header

The logic was plain wrong, bug introduced while typing initial code.

Closes: Coverity CID#243535
Change-Id: I497667edd0571fff91ab41c8b57bdcf277e5988d
This commit is contained in:
Pau Espin 2022-01-07 13:44:29 +01:00
parent 14cceb5dfb
commit 70b65c55f6
1 changed files with 1 additions and 1 deletions

View File

@ -246,7 +246,7 @@ static int hnb_gtp_wq_read_cb(struct osmo_fd *fd)
if (hdr->s || hdr->pn || hdr->e)
opt_hdr_len = 4;
if (hdr->pn)
else
opt_hdr_len = 0;
if (msgb_length(msg) < sizeof(*hdr) + opt_hdr_len) {