From e94e75e0bc1f1fe8c59292d66ae00805bfdb8166 Mon Sep 17 00:00:00 2001 From: dtc <dtc> Date: Wed, 20 Sep 2000 00:34:42 +0000 Subject: [PATCH] Catch NULL host enter aliases in lookup-host-entry to avoid dereferencing NULL. --- code/internet.lisp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/code/internet.lisp b/code/internet.lisp index d9db25763..42f6911d1 100644 --- a/code/internet.lisp +++ b/code/internet.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/internet.lisp,v 1.25 2000/09/15 14:40:35 pw Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/internet.lisp,v 1.26 2000/09/20 00:34:42 dtc Exp $") ;;; ;;; ********************************************************************** ;;; @@ -207,9 +207,11 @@ struct in_addr { (collect ((results)) (iterate repeat ((index 0)) (declare (type kernel:index index)) - (cond ((zerop (deref (cast (slot hostent 'aliases) - (* (unsigned #-alpha 32 #+alpha 64))) - index)) + (cond ((or (zerop (sap-int (alien-sap (slot hostent 'aliases)))) + (zerop (deref (cast (slot hostent 'aliases) + (* (unsigned #-alpha 32 + #+alpha 64))) + index))) (results)) (t (results (deref (slot hostent 'aliases) index)) -- GitLab