From c8ad60b95f0b43cf09e4b2f493fb0e65a8a83c32 Mon Sep 17 00:00:00 2001 From: "valeski%netscape.com" Date: Tue, 1 Feb 2000 22:35:28 +0000 Subject: [PATCH] r=gordon. 23709. Adding an extra check before trying to memcpy hostent data, this should fix the crashing we've been seeing on some win95 boxes, but it doesn't fix the problem of not having any A entries in DNS --- netwerk/base/src/nsSocketTransport.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/netwerk/base/src/nsSocketTransport.cpp b/netwerk/base/src/nsSocketTransport.cpp index 1fd60777f0d..85731c59846 100644 --- a/netwerk/base/src/nsSocketTransport.cpp +++ b/netwerk/base/src/nsSocketTransport.cpp @@ -1460,7 +1460,8 @@ nsSocketTransport::OnFound(nsISupports *aContext, nsAutoLock lock(mLock); nsresult rv = NS_OK; - if (aHostEnt->hostEnt.h_addr_list) { + if (aHostEnt->hostEnt.h_addr_list + && aHostEnt->hostEnt.h_addr_list[0]) { memcpy(&mNetAddress.inet.ip, aHostEnt->hostEnt.h_addr_list[0], sizeof(mNetAddress.inet.ip));