Skip to content

Commit

Permalink
Avoid dereferencing NULL conn ptr in the driver query logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
asteets committed Jan 29, 2009
1 parent 6150a9a commit 742dc00
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions nsd/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
*
*/

static const char *RCSID = "@(#) $Header: /Users/dossy/Desktop/cvs/aolserver/nsd/driver.c,v 1.57 2007/10/19 09:46:38 gneumann Exp $, compiled: " __DATE__ " " __TIME__;
static const char *RCSID = "@(#) $Header: /Users/dossy/Desktop/cvs/aolserver/nsd/driver.c,v 1.58 2009/01/29 20:54:24 asteets Exp $, compiled: " __DATE__ " " __TIME__;

#include "nsd.h"

Expand Down Expand Up @@ -1328,7 +1328,12 @@ DriverThread(void *arg)
pdata.pfds[sockPtr->pidx].revents,
sockPtr->acceptTime.sec, sockPtr->acceptTime.usec,
sockPtr->timeout.sec, sockPtr->timeout.usec);
NsAppendConn(drvPtr->queryPtr, sockPtr->connPtr, "i/o");
if (sockPtr->connPtr != NULL) {
NsAppendConn(drvPtr->queryPtr, sockPtr->connPtr, "i/o");
} else {
Tcl_DStringStartSublist(drvPtr->queryPtr);
Tcl_DStringEndSublist(drvPtr->queryPtr);
}
Tcl_DStringEndSublist(drvPtr->queryPtr);
sockPtr = sockPtr->nextPtr;
}
Expand Down

0 comments on commit 742dc00

Please sign in to comment.