Change in osmo-hlr[master]: osmo_mdns_rfc_record_decode: check ret of talloc
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/30775 ) Change subject: osmo_mdns_rfc_record_decode: check ret of talloc ...................................................................... osmo_mdns_rfc_record_decode: check ret of talloc Related: OS#5821 Change-Id: Icd0f54a8eb80ca50976f248e017f6e5c727385f3 --- M src/mslookup/mdns_rfc.c 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/75/30775/1 diff --git a/src/mslookup/mdns_rfc.c b/src/mslookup/mdns_rfc.c index 6f39a8e..1bbc7b1 100644 --- a/src/mslookup/mdns_rfc.c +++ b/src/mslookup/mdns_rfc.c @@ -237,9 +237,13 @@ struct osmo_mdns_rfc_record *osmo_mdns_rfc_record_decode(void *ctx, const uint8_t *data, size_t data_len, size_t *record_len) { - struct osmo_mdns_rfc_record *ret = talloc_zero(ctx, struct osmo_mdns_rfc_record); + struct osmo_mdns_rfc_record *ret; size_t name_len; + ret = talloc_zero(ctx, struct osmo_mdns_rfc_record); + if (!ret) + return NULL; + /* name */ ret->domain = osmo_mdns_rfc_qname_decode(ret, (const char *)data, data_len - 10); if (!ret->domain) -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/30775 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Icd0f54a8eb80ca50976f248e017f6e5c727385f3 Gerrit-Change-Number: 30775 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith@sysmocom.de> Gerrit-MessageType: newchange
participants (1)
-
osmith