summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2009-06-15 12:18:21 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2009-08-18 06:57:51 (GMT)
commitc53eb034bb53ea51bc299066e5d1e79565876b71 (patch) (side-by-side diff)
tree86047d249b190790e3e276c6824749314797a7fe
parent50d90aca70a5f3033b9dbc4235bc11ec92a026d5 (diff)
downloadmailfromd-c53eb034bb53ea51bc299066e5d1e79565876b71.tar.gz
mailfromd-c53eb034bb53ea51bc299066e5d1e79565876b71.tar.bz2
Bugfixes
* mfd/bi_io.m4 (read): Add terminating zero. * mflib/match_dnsbl.mf (match_dnsbl): Return 0 if address is not resolved. * mflib/sockmap.mf (sockmap_single_lookup): Fix typo.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--mfd/bi_io.m41
-rw-r--r--mflib/match_dnsbl.mf6
-rw-r--r--mflib/sockmap.mf2
3 files changed, 7 insertions, 2 deletions
diff --git a/mfd/bi_io.m4 b/mfd/bi_io.m4
index 345c0c3..8169353 100644
--- a/mfd/bi_io.m4
+++ b/mfd/bi_io.m4
@@ -511,6 +511,7 @@ MF_DEFUN(read, STRING, NUMBER fd, NUMBER size)
mfe_io,
_("Read error on %s: %s"),
iotab[fd].name, mu_strerror(errno));
+ s[size] = 0;
MF_RETURN(off);
}
END
diff --git a/mflib/match_dnsbl.mf b/mflib/match_dnsbl.mf
index d181c9a..6f4692f 100644
--- a/mflib/match_dnsbl.mf
+++ b/mflib/match_dnsbl.mf
@@ -29,7 +29,11 @@ do
if %address matches
'^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$'
- if match_cidr (resolve ("\4.\3.\2.\1", %zone), %iprange)
+ string res resolve ("\4.\3.\2.\1", %zone)
+ if %res == "0"
+ return 0
+ fi
+ if match_cidr (%res, %iprange)
return 1
else
return 0
diff --git a/mflib/sockmap.mf b/mflib/sockmap.mf
index e913b16..46b1bb5 100644
--- a/mflib/sockmap.mf
+++ b/mflib/sockmap.mf
@@ -44,7 +44,7 @@ func sockmap_single_lookup(string url, string map, string arg)
returns string
do
number fd open("@ %url")
- string res sockmap_query(%fd, %map, %arg)
+ string res sockmap_lookup(%fd, %map, %arg)
close(%fd)
return %res
done

Return to:

Send suggestions and report system problems to the System administrator.