mdns_rfc.c: fix possible access of uninit. mem
Fixes: CID#207548 Change-Id: Ifa269d8a88d84c01349668cdd8d1f1d24c12c6d8
This commit is contained in:
parent
4fa9653733
commit
74e7072f63
|
@ -83,7 +83,12 @@ char *osmo_mdns_rfc_qname_decode(void *ctx, const char *qname, size_t qname_max_
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
while (*qname) {
|
while (*qname) {
|
||||||
size_t len = *qname;
|
size_t len;
|
||||||
|
|
||||||
|
if (i >= qname_max_len)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
len = *qname;
|
||||||
next_label = qname + len + 1;
|
next_label = qname + len + 1;
|
||||||
|
|
||||||
if (next_label >= qname_end || i + len > OSMO_MDNS_RFC_MAX_NAME_LEN)
|
if (next_label >= qname_end || i + len > OSMO_MDNS_RFC_MAX_NAME_LEN)
|
||||||
|
|
Loading…
Reference in New Issue