www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2023/01/31/15:32:39

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
Date: Tue, 31 Jan 2023 15:13:51 -0500
Message-Id: <202301312013.30VKDpCR2436099@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: geda-user AT delorie DOT com
Subject: [geda-user] strncpy in pcb
Reply-To: geda-user AT delorie DOT com

This function doesn't do what we really want.  If the string to be
copied is the same size as the destination, you end up with a string
that is not NUL terminated.  If it's shorter, we waste time padding
the output with unneeded NULs.

I propose we replace it with pcb_strlcpy (strlcpy does what we want,
but is bsd-specific).

This happens to mean diverging from upstream for gts/named.c, by at
least including something local that can #define strncpy

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019