From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1UNTqY-0006hb-3t for mharc-grub-devel@gnu.org; Wed, 03 Apr 2013 15:59:50 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNTqU-0006cY-HP for grub-devel@gnu.org; Wed, 03 Apr 2013 15:59:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNTqS-0002na-6K for grub-devel@gnu.org; Wed, 03 Apr 2013 15:59:46 -0400 Received: from mail-ea0-x22c.google.com ([2a00:1450:4013:c01::22c]:38425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNTqR-0002n6-VO for grub-devel@gnu.org; Wed, 03 Apr 2013 15:59:44 -0400 Received: by mail-ea0-f172.google.com with SMTP id z7so777647eaf.17 for ; Wed, 03 Apr 2013 12:59:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type; bh=dMfMdTI1WUmxv7y2DW7PM4vbV3KpWe7ZeV3dPAb5ulI=; b=IlwP0WidTYhUDniDprRm7aeftssv+4YoE5QkrDlC2746Z6d3nNlL2fw/dspip05i/H 9PDN1Mo8MetQsKouJwiy8lRJ2+T4p2Ae5U4gQHrs0vBAQJ7sz7Zcc8loYJsCo12skHnZ NfR3AsfU1YRAqREMHf6K0zG/3JzugOCpcQOv6MGSYIedPVMJ4PrsfAMzPhjw3rSBnvy+ YZLXudrB5ELHNZw/1If4pOtc0zpzI+/lZf88tHbUumtPcW/IlNipNMPb+158TLxW84v8 hDJZnXUDE6/+GqBJryB/j6o9WvHdbppfepM6hdA48bG+C2f8aEI0SEnE38QW2+8wLB0V FDlQ== X-Received: by 10.15.36.135 with SMTP id i7mr5742179eev.34.1365019182987; Wed, 03 Apr 2013 12:59:42 -0700 (PDT) Received: from debian.x201.phnet (77-88.1-85.cust.bluewin.ch. [85.1.88.77]) by mx.google.com with ESMTPS id bc1sm8966249eeb.11.2013.04.03.12.59.41 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Apr 2013 12:59:42 -0700 (PDT) Message-ID: <515C8A24.1070605@gmail.com> Date: Wed, 03 Apr 2013 21:59:32 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH 3/7] Initial support for U-Boot platforms References: <515710E6.6090500@gmail.com> <20130403162451.GK23069@rocoto.smurfnet.nu> <20130403180539.GI21768@csclub.uwaterloo.ca> In-Reply-To: <20130403180539.GI21768@csclub.uwaterloo.ca> X-Enigmail-Version: 1.4.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigA4521742F0205DC72ED125E6" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::22c X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Apr 2013 19:59:48 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA4521742F0205DC72ED125E6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03.04.2013 20:05, Lennart Sorensen wrote: > On Wed, Apr 03, 2013 at 04:24:51PM +0000, Leif Lindholm wrote: >> Because I am an overtly paranoid person. :) >=20 > That's not paranoid. That's just inefficient. The length argument has= > to be based on the target size, NOT the length of the source. If you w= ant > to length of the source, that's what plain old strcpy does by definitio= n. >=20 > I just found some of those in some other code I was cleaning up and > wasn't pleased with them there. Just because it says strncpy doesn't > mean what you are doing is any safer than strcpy if you do it wrong. >=20 Please use grub_strdup in this case. Also grub_stpcpy may be useful --------------enigA4521742F0205DC72ED125E6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAlFciisACgkQNak7dOguQgmyegD/eGsvFHTMLbT4cqZGoSupyQ+1 /JLcPrLW3WmY4V4MU9AA/1fk0x/egmsSx4Ok1etdZe0Q4eguPWBq9Z9aAFGgCI8j =Lgfz -----END PGP SIGNATURE----- --------------enigA4521742F0205DC72ED125E6--