Message ID | 1708177632-11449-1-git-send-email-ivo.g.dimitrov.75@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | befa5fc9629ba962c798c6ef1571587b90d5ac3a |
Headers | show |
Series | qmimodem: call-forwarding: Fix possible buffer overflow | expand |
Hello: This patch was applied to ofono.git (master) by Denis Kenzior <denkenz@gmail.com>: On Sat, 17 Feb 2024 15:47:12 +0200 you wrote: > --- > drivers/qmimodem/call-forwarding.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Here is the summary with links: - qmimodem: call-forwarding: Fix possible buffer overflow https://git.kernel.org/pub/scm/network/ofono/ofono.git/?id=befa5fc9629b You are awesome, thank you!
diff --git a/drivers/qmimodem/call-forwarding.c b/drivers/qmimodem/call-forwarding.c index 9c0c45a..5972055 100644 --- a/drivers/qmimodem/call-forwarding.c +++ b/drivers/qmimodem/call-forwarding.c @@ -103,7 +103,7 @@ static void query_cb(struct qmi_result *result, void *user_data) * FIXME - shall we fallback to 0x10 if there is no extended info? */ p = qmi_result_get(result, 0x16, &length); - if (p) { + if (p && length) { struct ofono_call_forwarding_condition *list; const uint8_t *end = p + length; int i;