HS 2.0: Add NULL check before dereferencing in hs20-osu-client
xml_node_get_text() may return NULL, so need to check the return value before using it. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
bea8d9a39a
commit
088a210d60
1 changed files with 5 additions and 0 deletions
|
@ -772,6 +772,11 @@ static int oma_dm_replace(struct hs20_osu_client *ctx, xml_node_t *replace,
|
|||
if (node) {
|
||||
char *type;
|
||||
type = xml_node_get_text(ctx->xml, node);
|
||||
if (type == NULL) {
|
||||
wpa_printf(MSG_INFO, "Could not find type text");
|
||||
os_free(locuri);
|
||||
return DM_RESP_BAD_REQUEST;
|
||||
}
|
||||
use_tnds = node &&
|
||||
os_strstr(type, "application/vnd.syncml.dmtnds+xml");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue