From 0734d471d9cec41331e67f8a36bcf05fb3397894 Mon Sep 17 00:00:00 2001 From: Dragos Oancea Date: Fri, 31 Jan 2020 15:19:08 +0000 Subject: [PATCH] [sofia-sip] scan-build: Null pointer passed as an argument to a 'nonnull' parameter --- libs/sofia-sip/libsofia-sip-ua/msg/msg_parser_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/sofia-sip/libsofia-sip-ua/msg/msg_parser_util.c b/libs/sofia-sip/libsofia-sip-ua/msg/msg_parser_util.c index 11fc1358eb..b64c4489df 100644 --- a/libs/sofia-sip/libsofia-sip-ua/msg/msg_parser_util.c +++ b/libs/sofia-sip/libsofia-sip-ua/msg/msg_parser_util.c @@ -1762,7 +1762,7 @@ issize_t msg_unquoted_e(char *b, isize_t bsiz, char const *s) s++; } else { - if (e + n <= bsiz) + if (b && (e + n <= bsiz)) memcpy(b + e, s, n); e += n; s += n;