Share

Autostatus

Tracker: Bugs

5 tcpcheck segfault - ID: 421811
Last Update: Tracker Item Submitted ( titty )

ralf@monster:~/autostatus$ ./tcpcheck 0.1 foo.bar:80
brainbot.com:80
foo.bar failed. could not resolve address
brainbot.com:80 failed: timed out
Segmentation fault (core dumped)

The following patch solves the problem:
diff -u -r1.1.1.1 tcpcheck.c
--- tcpcheck.c 2000/05/05 15:17:01 1.1.1.1
+++ tcpcheck.c 2001/05/06 12:20:10
@@ -307,7 +307,7 @@

/* Now clean up the remainder... they timed out. */
for (i = 0; i < numcons; i++) {
- if (cons[i]->status == 0) {
+ if (cons[i] != NULL && cons[i]->status == 0) {
printf("%s:%d failed: timed out\n",
cons[i]->hostname, cons[i]->port);
}


Ralf Schmitt ( titty ) - 2001-05-06 12:21

5

Open

None

Nobody/Anonymous

None

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.