From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf van der Spek Subject: Re: [PATCH] Btrfs-progs use safe string manipulation functions Date: Thu, 10 Feb 2011 13:27:09 +0100 Message-ID: References: <1297081322.4615.10.camel@monotop> <4D53C711.3000309@nsc.liu.se> <1297338885.3524.83.camel@tacticus> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: linux-btrfs@vger.kernel.org To: Lars Wirzenius Return-path: In-Reply-To: <1297338885.3524.83.camel@tacticus> List-ID: On Thu, Feb 10, 2011 at 12:54 PM, Lars Wirzenius wrote: > On to, 2011-02-10 at 11:37 +0000, Jeremy Sanders wrote: >> There's strlcpy, but it's not in glibc because of possible truncation >> errors! > > snprintf is standard, and should be about as safe as it gets with the > glibc functions. But snprintf is not like strlcpy. Olaf