From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VpENT-000527-30 for mharc-grub-devel@gnu.org; Sat, 07 Dec 2013 04:40:47 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VpENJ-00051z-HA for grub-devel@gnu.org; Sat, 07 Dec 2013 04:40:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VpENA-0002S5-V5 for grub-devel@gnu.org; Sat, 07 Dec 2013 04:40:37 -0500 Received: from mail-la0-x22d.google.com ([2a00:1450:4010:c03::22d]:57630) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VpENA-0002S1-IN for grub-devel@gnu.org; Sat, 07 Dec 2013 04:40:28 -0500 Received: by mail-la0-f45.google.com with SMTP id eh20so662478lab.18 for ; Sat, 07 Dec 2013 01:40:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-type; bh=jHPitqlFK0VxKi/lO0fsCS/jVUNPQ5in28Wry+U2Az8=; b=ihIAJ+5lHEA947kLkr7mSPdSqFntATfrO70T4i/1hVu+0CXtzDowvgmkRJDhVO6GdC g0W5GiA1lBaJoANOJ4xJaD9g1BjUCG/H6F4shCp9G1Vo3e91nD4/jxaIFaMD0sVBcxpk t909UncDRvEj8a8ZuzM4IbQi/N24UgzXtxwWBU13zXTZqaf7KEtVIzexRTal/z3g5Adz gvCWHwHoKPVxdZqjPXjQ0XOSRIvV4eLEm+nxhvh4Yq/YESzw0GLLAOEVKQhvcPJVGJaq ega+1VEwaxY3vNva3KTuZlTB2HJLsH/KNPFRNhfZWyaWt0ivT13e7bFf4kQQLTiBEjOX TLqA== X-Received: by 10.152.120.7 with SMTP id ky7mr30289lab.83.1386409227344; Sat, 07 Dec 2013 01:40:27 -0800 (PST) Received: from opensuse.site (ppp91-76-134-134.pppoe.mtu-net.ru. [91.76.134.134]) by mx.google.com with ESMTPSA id bl6sm1460283lbb.5.2013.12.07.01.40.25 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Sat, 07 Dec 2013 01:40:26 -0800 (PST) Date: Sat, 7 Dec 2013 13:40:22 +0400 From: Andrey Borzenkov To: grub-devel@gnu.org Subject: Re: [PATCH 2/2] second attempt to fix using grub device name as install device Message-ID: <20131207134022.487abb56@opensuse.site> In-Reply-To: <52A2E0B0.2030608@gmail.com> References: <1386405872-28362-1-git-send-email-arvidjaar@gmail.com> <1386405872-28362-2-git-send-email-arvidjaar@gmail.com> <52A2E0B0.2030608@gmail.com> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.18; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/GGl0eJWX56W6PE7_4BXq=RA"; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22d 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: Sat, 07 Dec 2013 09:40:46 -0000 --Sig_/GGl0eJWX56W6PE7_4BXq=RA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable =D0=92 Sat, 07 Dec 2013 09:47:44 +0100 Vladimir '=CF=86-coder/phcoder' Serbinenko =D0=BF=D0=B8= =D1=88=D0=B5=D1=82: > On 07.12.2013 09:44, Andrey Borzenkov wrote: > > + install_device[grub_strlen (install_device) - 1] =3D '\0'; > > + install_drive =3D xstrdup (install_device + 1); > > + install_device[grub_strlen (install_device) - 1] =3D ')'; > > + } > Bad code. You forgot that grub_strlen changes with your operations. You > need to keep explicit pointer. >=20 >=20 Oops. Any reason "our" gnulib is missing xstrndup? It is not the only place where it will make things more simple and readable. --Sig_/GGl0eJWX56W6PE7_4BXq=RA Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlKi7QkACgkQR6LMutpd94yaJwCfZTizGYObK3VDQHyetjdPVJOC u6IAnit18MEYkdsHrq6++qPT/D1bw1kY =k3Ij -----END PGP SIGNATURE----- --Sig_/GGl0eJWX56W6PE7_4BXq=RA--