diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-04-16 20:04:19 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-04-16 20:04:19 +0000 |
commit | 5150e0d85fd36298bf6095a7dc1b8df8fd25de92 (patch) | |
tree | d520143c8fb8c26b5f8b7e43bbf802562ba2657b /gacopyz | |
parent | 3f7383369605d49c55c0ec6267bfd4a13c64749c (diff) | |
download | mailfromd-5150e0d85fd36298bf6095a7dc1b8df8fd25de92.tar.gz mailfromd-5150e0d85fd36298bf6095a7dc1b8df8fd25de92.tar.bz2 |
Fix Milter packet length calculation & redo Berkeley DB locking
git-svn-id: file:///svnroot/mailfromd/trunk@1355 7a8a7f39-df28-0410-adc6-e0d955640f24
Diffstat (limited to 'gacopyz')
-rw-r--r-- | gacopyz/gacopyz.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/gacopyz/gacopyz.c b/gacopyz/gacopyz.c index 1c71a142..c9445134 100644 --- a/gacopyz/gacopyz.c +++ b/gacopyz/gacopyz.c @@ -858,17 +858,11 @@ shan_connect(SMFICTX *ctx, union state_arg *arg, unsigned char *cmd) s = arg->strings[1]; family = *s++; - len = strlen(s); if (family != SMFIA_UNKNOWN) { - if (len < sizeof port) { - gacopyz_log(ctx->conn, SMI_LOG_ERR, - "%s: shan_connect: wrong length", - ctx->conn->desc.xxfi_name); - return sret_abort; - } port = *(unsigned short*) s; s += sizeof port; - len -= sizeof port; + + len = strlen(s); if (len > 0 && s[len]) return sret_abort; |