From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoeQ3-00022r-2G for qemu-devel@nongnu.org; Sat, 21 Jan 2012 12:08:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RoeQ1-0002zz-A8 for qemu-devel@nongnu.org; Sat, 21 Jan 2012 12:07:58 -0500 Message-ID: <4F1AF0E2.8050907@web.de> Date: Sat, 21 Jan 2012 18:07:46 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <4F1AC0EB.3050304@web.de> <4F1AE974.2090401@suse.de> In-Reply-To: <4F1AE974.2090401@suse.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigDE85DC5722BDC0C40DBD592E" Subject: Re: [Qemu-devel] [PATCH] qdev-property: Make bit property parsing stricter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?Andreas_F=E4rber?= Cc: qemu-trivial , qemu-devel , Markus Armbruster This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDE85DC5722BDC0C40DBD592E Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2012-01-21 17:36, Andreas F=E4rber wrote: > Am 21.01.2012 14:43, schrieb Jan Kiszka: >> By using strncasecmp, we allow for arbitrary characters after the >> "on"/"off" string. Fix this by switching to strcasecmp. >> >> Signed-off-by: Jan Kiszka >=20 > Reviewed-by: Andreas F=E4rber >=20 > An alternative might be to increase the char count by one. For a const > char* parameter I see the responsibility for nul-terminating at the > caller though, so this seems right. Did you check all callers? For any normal function that takes a char * string without a maximum length, the responsibility for terminating is on caller side. Also because we checks against patterns of different length. So we don't need to jump through hoops here. Jan --------------enigDE85DC5722BDC0C40DBD592E Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8a8OgACgkQitSsb3rl5xQqdQCgq+exo0JwIFeNBi0tGG0x6MXZ 2aQAoKx1Dkyfus+Uy9mD0ID4W8o9EBwj =fisD -----END PGP SIGNATURE----- --------------enigDE85DC5722BDC0C40DBD592E--