mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-06 13:09:50 +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:
parent
af785a075f
commit
c171ec35b6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=158086
@ -974,7 +974,7 @@ pccard_safe_quote(char *dst, const char *src, size_t len)
|
|||||||
|
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
return;
|
return;
|
||||||
while (walker < ep)
|
while (src != NULL && walker < ep)
|
||||||
{
|
{
|
||||||
if (*src == '"') {
|
if (*src == '"') {
|
||||||
if (ep - walker < 2)
|
if (ep - walker < 2)
|
||||||
|
Loading…
Reference in New Issue
Block a user