delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to geda-user-bounces using -f |
X-Authentication-Warning: | envy.delorie.com: dj set sender to dj AT delorie DOT com using -f |
From: | DJ Delorie <dj AT delorie DOT com> |
To: | geda-user AT delorie DOT com |
Subject: | Re: [geda-user] strncpy in pcb |
In-Reply-To: | <20230201135401.50A0B85E50B7@turkos.aspodata.se> |
(geda-user AT delorie DOT com) | |
Date: | Wed, 01 Feb 2023 12:42:51 -0500 |
Message-ID: | <xna61x2sf8.fsf@envy.delorie.com> |
MIME-Version: | 1.0 |
Reply-To: | geda-user AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | geda-user AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
"karl AT aspodata DOT se [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com> writes: > Regardless if you are using strncpy or strlcpy you have to apply > checks to verify that the copy was successful. Yup. > There are 23 strncpy'ies in pcb. > Are you fixing all off them or just fixing a troublesome case ? I was planning on #defining strncpy to something else, which would hit all of them at once. That something else could fault in some pcb-specific way. > Since pcb is using glib, perhaps using its string handling > functions would be friutful, or possible any other already > written string handling library. Suggestions welcome. I'm just trying to fix new warnings that happen with gcc 13 -std=gnu99
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |