aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 345c0c35..81693532 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 d181c9ad..6f4692f1 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 e913b167..46b1bb54 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.