[Xastir-dev] Switching string length discussion to here
Curt Mills
curt.we7u at gmail.com
Sun Dec 19 14:37:24 PST 2021
Ah, should have read everything more thoroughly... So by adding
another library to Linux we might be able to use something better.
On Sun, Dec 19, 2021 at 2:36 PM Curt Mills <curt.we7u at gmail.com> wrote:
>
> Nope. I remember considering those before after a bunch of research. I
> think they're on some BSD-derived systems but they're not on Linux.
>
> On Sun, Dec 19, 2021 at 2:33 PM Tom Russo <russo at bogodyn.org> wrote:
> >
> > On Sun, Dec 19, 2021 at 03:27:07PM -0700, we recorded a bogon-computron collision of the <russo at bogodyn.org> flavor, containing:
> > > On Sun, Dec 19, 2021 at 03:25:28PM -0700, we recorded a bogon-computron collision of the <russo at bogodyn.org> flavor, containing:
> > > > On Sun, Dec 19, 2021 at 03:12:50PM -0600, we recorded a bogon-computron collision of the <godfreja at gmail.com> flavor, containing:
> > > > > There is also strlcat.
> > > >
> > > > Are these in the C standard, snprintf?
> > >
> > > "unlike snprintf"
> >
> > It appears that they are not standard in either ISO or POSIX standards.
> >
> > From https://stackoverflow.com/questions/2114896/why-are-strlcpy-and-strlcat-considered-insecure
> >
> > strlcpy() and strlcat() are not standard, neither ISO C nor POSIX. So,
> > their use in portable programs is impossible. In fact, strlcat() has
> > two different variants: the Solaris implementation is different from
> > the others for edge cases involving length 0. This makes it even less useful
> > than otherwise.
> >
> > From the same discussion:
> >
> > This API has been adopted by most modern operating systems and many
> > standalone software packages, including OpenBSD (where it originated),
> > Sun Solaris, FreeBSD, NetBSD, the Linux kernel, rsync and the GNOME project.
> > The notable exception is the GNU standard C library, glibc [12], whose
> > maintainer steadfastly refuses to include these improved APIs, labelling
> > them "horribly inefficient BSD crap" [4], despite prior evidence that they
> > are faster is most cases than the APIs they replace [13].
> >
> > That is why they are not available in glibc, but it is not true that they
> > are not available on Linux. They are available on Linux in libbsd:
> >
> > https://libbsd.freedesktop.org/
> >
> >
> > --
> > Tom Russo KM5VY
> > Tijeras, NM
> >
> > echo "prpv_a'rfg_cnf_har_cvcr" | sed -e 's/_/ /g' | tr [a-m][n-z] [n-z][a-m]
> >
> > _______________________________________________
> > Xastir-dev mailing list
> > Xastir-dev at lists.xastir.org
> > http://xastir.org/mailman/listinfo/xastir-dev
>
>
>
> --
> Curt, WE7U http://xastir.org http://www.sarguydigital.com
--
Curt, WE7U http://xastir.org http://www.sarguydigital.com
More information about the Xastir-dev
mailing list