lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.01.1008051447100.13201@obet.zrqbmnf.qr>
Date:	Thu, 5 Aug 2010 14:50:11 +0200 (CEST)
From:	Jan Engelhardt <jengelh@...ozas.de>
To:	Simon Horman <horms@...ge.net.au>
cc:	lvs-devel@...r.kernel.org, netdev@...r.kernel.org,
	netfilter@...r.kernel.org, netfilter-devel@...r.kernel.org,
	Wensong Zhang <wensong@...ux-vs.org>,
	Julian Anastasov <ja@....bg>, Patrick McHardy <kaber@...sh.net>
Subject: Re: [rfc 13/13] [RFC 13/13] IPVS: sip persistence engine

On Thursday 2010-08-05 13:48, Simon Horman wrote:
>+
>+static const char *ip_vs_dbg_callid(char *buf, size_t buf_len,
>+				    const char *callid, size_t callid_len,
>+				    int *idx)
>+{
>+	size_t len = min(min(callid_len, (size_t)64), buf_len - *idx - 1);
>+	memcpy(buf + *idx, callid, len);
>+	*(buf + *idx + len) = '\0';

Nothing particular wrong, though I just noticed that I would have 
personally, instinctively written

	buf[*idx+len] = '\0';

instead. Sure you have your reasons ;-)

>+	/* RFC 2543 allows lines to be terminated with CR, LF or CRLF,
>+	 * RFC 3261 allows only CRLF, we support both. */
>+	if (*(dptr + *matchoff + *matchlen) != '\r' &&
>+	    *(dptr + *matchoff + *matchlen) != '\n')
>+		return -EINVAL;

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ