diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-06-15 15:18:21 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-08-18 09:57:51 +0300 |
commit | c53eb034bb53ea51bc299066e5d1e79565876b71 (patch) | |
tree | 86047d249b190790e3e276c6824749314797a7fe | |
parent | 50d90aca70a5f3033b9dbc4235bc11ec92a026d5 (diff) | |
download | mailfromd-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.
-rw-r--r-- | mfd/bi_io.m4 | 1 | ||||
-rw-r--r-- | mflib/match_dnsbl.mf | 6 | ||||
-rw-r--r-- | mflib/sockmap.mf | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/mfd/bi_io.m4 b/mfd/bi_io.m4 index 345c0c35..81693532 100644 --- a/mfd/bi_io.m4 +++ b/mfd/bi_io.m4 @@ -513,2 +513,3 @@ MF_DEFUN(read, STRING, NUMBER fd, NUMBER size) iotab[fd].name, mu_strerror(errno)); + s[size] = 0; MF_RETURN(off); diff --git a/mflib/match_dnsbl.mf b/mflib/match_dnsbl.mf index d181c9ad..6f4692f1 100644 --- a/mflib/match_dnsbl.mf +++ b/mflib/match_dnsbl.mf @@ -31,3 +31,7 @@ do '^([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 diff --git a/mflib/sockmap.mf b/mflib/sockmap.mf index e913b167..46b1bb54 100644 --- a/mflib/sockmap.mf +++ b/mflib/sockmap.mf @@ -46,3 +46,3 @@ do number fd open("@ %url") - string res sockmap_query(%fd, %map, %arg) + string res sockmap_lookup(%fd, %map, %arg) close(%fd) |