#! /bin/sh /usr/share/dpatch/dpatch-run ## fix-delivery-segv.dpatch by Daniel Kahn Gillmor ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: fixing a segfault if no DeliveryHost is specified. @DPATCH@ diff -urNad dspam-3.6.6/src/client.c /tmp/dpep.oHqFiC/dspam-3.6.6/src/client.c --- dspam-3.6.6/src/client.c 2006-05-25 11:19:04.287787079 -0400 +++ /tmp/dpep.oHqFiC/dspam-3.6.6/src/client.c 2006-05-25 11:19:33.009003264 -0400 @@ -289,7 +289,7 @@ if (_ds_read_attribute(agent_config, "DeliveryPort")) port = atoi(_ds_read_attribute(agent_config, "DeliveryPort")); - if (host[0] == '/') + if (host && (host[0] == '/')) domain = 1; } else { @@ -298,7 +298,7 @@ if (_ds_read_attribute(agent_config, "ClientPort")) port = atoi(_ds_read_attribute(agent_config, "ClientPort")); - if (host[0] == '/') + if (host && (host[0] == '/')) domain = 1; }