Message ID | 20241216102021.345566-2-absicsz@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [1/3] util: ensure decode_hex_own_buf is passed a valid buffer | expand |
diff --git a/drivers/atmodem/ussd.c b/drivers/atmodem/ussd.c index 32a9fe91..775c74d1 100644 --- a/drivers/atmodem/ussd.c +++ b/drivers/atmodem/ussd.c @@ -121,6 +121,11 @@ static void cusd_parse(GAtResult *result, struct ofono_ussd *ussd) DBG("response charset %d modem charset %d", charset, data->charset); + if (strlen(content) > sizeof(msg) * 2) + status = 4; /* Not supported */ + goto out; + } + switch (charset) { case SMS_CHARSET_7BIT: switch (data->charset) {