From c171ec35b63caff2f5702d382ce35e1100722f46 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 27 Apr 2006 20:47:13 +0000 Subject: [PATCH] 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... --- sys/dev/pccard/pccard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c index aa018930a43..260909a16ec 100644 --- a/sys/dev/pccard/pccard.c +++ b/sys/dev/pccard/pccard.c @@ -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)