mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue