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;