All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sicelo A. Mhlongo" <absicsz@gmail.com>
To: ofono@lists.linux.dev
Cc: "Sicelo A. Mhlongo" <absicsz@gmail.com>
Subject: [PATCH v2 1/3] util: ensure decode_hex_own_buf is passed a valid buffer
Date: Tue, 17 Dec 2024 11:31:27 +0200	[thread overview]
Message-ID: <20241217093207.20636-1-absicsz@gmail.com> (raw)

---
 src/util.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/util.c b/src/util.c
index 53d55d7e..bfe46ef2 100644
--- a/src/util.c
+++ b/src/util.c
@@ -3181,6 +3181,9 @@ unsigned char *decode_hex_own_buf(const char *in, long len, long *items_written,
 	char c;
 	unsigned char b;
 
+	if (!buf)
+		return NULL;
+
 	if (len < 0)
 		len = strlen(in);
 
-- 
2.45.2


             reply	other threads:[~2024-12-17  9:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-17  9:31 Sicelo A. Mhlongo [this message]
2024-12-17  9:31 ` [PATCH v2 2/3] atmodem: sms: ensure buffer is initialized before use Sicelo A. Mhlongo
2024-12-17  9:31 ` [PATCH v2 3/3] ussd: ensure ussd content fits in buffers Sicelo A. Mhlongo
2024-12-17 17:20 ` [PATCH v2 1/3] util: ensure decode_hex_own_buf is passed a valid buffer patchwork-bot+ofono

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241217093207.20636-1-absicsz@gmail.com \
    --to=absicsz@gmail.com \
    --cc=ofono@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.