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:
parent
14cceb5dfb
commit
70b65c55f6
|
@ -246,7 +246,7 @@ static int hnb_gtp_wq_read_cb(struct osmo_fd *fd)
|
||||||
|
|
||||||
if (hdr->s || hdr->pn || hdr->e)
|
if (hdr->s || hdr->pn || hdr->e)
|
||||||
opt_hdr_len = 4;
|
opt_hdr_len = 4;
|
||||||
if (hdr->pn)
|
else
|
||||||
opt_hdr_len = 0;
|
opt_hdr_len = 0;
|
||||||
|
|
||||||
if (msgb_length(msg) < sizeof(*hdr) + opt_hdr_len) {
|
if (msgb_length(msg) < sizeof(*hdr) + opt_hdr_len) {
|
||||||
|
|
Loading…
Reference in New Issue