From 84c9005b8045d0cbebb8ec713468a9fa06a7b34f Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Sat, 16 Dec 2000 21:47:50 +0000 Subject: make sure cis1_info[i] is not NULL before strcmp() w/ it; fixes some obscure panics --- sys/dev/pcmcia/if_rln_pcmcia.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/dev/pcmcia/if_rln_pcmcia.c') diff --git a/sys/dev/pcmcia/if_rln_pcmcia.c b/sys/dev/pcmcia/if_rln_pcmcia.c index 99b634ec6b3..5c90087c1bd 100644 --- a/sys/dev/pcmcia/if_rln_pcmcia.c +++ b/sys/dev/pcmcia/if_rln_pcmcia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rln_pcmcia.c,v 1.10 2000/04/24 19:43:36 niklas Exp $ */ +/* $OpenBSD: if_rln_pcmcia.c,v 1.11 2000/12/16 21:47:49 mickey Exp $ */ /* * David Leonard , 1999. Public domain. * @@ -107,7 +107,8 @@ rln_pcmcia_product_lookup(pa) for (j = 0; j < 4; j++) { if (rpp->cis[j] == NULL) return rpp; - if (strcmp(pa->card->cis1_info[j], rpp->cis[j]) != 0) + if (pa->card->cis1_info[j] && + strcmp(pa->card->cis1_info[j], rpp->cis[j]) != 0) break; } if (j == 4) -- cgit v1.2.3