1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-04 12:52:15 +00:00

When pccard_safe_quote is passed NULL for src, it shouldn't panic.

Someone sent me this a while ago, but I can't find who to give them
proper credit...
This commit is contained in:
Warner Losh 2006-04-27 20:47:13 +00:00
parent af785a075f
commit c171ec35b6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=158086

View File

@ -974,7 +974,7 @@ pccard_safe_quote(char *dst, const char *src, size_t len)
if (len == 0)
return;
while (walker < ep)
while (src != NULL && walker < ep)
{
if (*src == '"') {
if (ep - walker < 2)