bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: John Zaitseff <J.Zaitseff@zap.org.au>
To: Gnulib discussion <bug-gnulib@gnu.org>
Subject: Adding strfmon(3) to Gnulib?
Date: Mon, 23 Jul 2018 19:17:15 +1000	[thread overview]
Message-ID: <20180723091714.4hoqu5op7puxchm3@zap.org.au> (raw)

Hi, all,

I've done a quick search of the Gnulib discussion list archives and
have not seen this issue raised:

Is it worth adding strfmon(3) and possibly strfmon_l(3) for those
systems that do not have it?  I'm thinking primarily OpenBSD, even
the latest version.  This OS does not have <monetary.h> either.

I have a little game (at https://www.zap.org.au/software/trader/)
that someone has requested be ported to OpenBSD.  Given that this
program is written in C, and that OpenBSD does not have strfmon(3),
the compile fails.

Gnucash gets around this issue by including strfmon.c from FreeBSD.
Unfortunately, the version included has an integer overflow
vulnerability, fixed in FreeBSD back in 2011, but not updated in
Gnucash.  Yes, I'll file a bug report...

Adding either the version of strfmon(3) from the GNU C Library, or
at worst the current FreeBSD version (2-clause BSD licence) to
Gnulib will hopefully mitigate security oversights like this.  With
appropriate macros, it might also allow problematic implementations
(such as possibly with macOS?) to be overridden with a decent one.

If the Gnulib maintainers are agreeable, I'll try setting aside some
time in the next couple of weeks to come up with a suitable patch or
git repository you can pull from.  If so, what is your preferred
procedure for patch submission etc.?

PS: Please include my email address in a CC--I'm not (yet)
subscribed to the Gnulib mailing list.

Yours truly,

John Zaitseff

-- 
John Zaitseff                    ,--_|\    The ZAP Group
Phone:  +61 2 9643 7737         /      \   Sydney, Australia
E-mail: J.Zaitseff@zap.org.au   \_,--._*   http://www.zap.org.au/
                                      v


             reply	other threads:[~2018-07-23  9:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-23  9:17 John Zaitseff [this message]
2018-07-23 10:31 ` Adding strfmon(3) to Gnulib? Paul Eggert
2018-07-23 10:41   ` John Zaitseff
2018-08-11  4:31 ` John Zaitseff
2018-08-12 20:13   ` Bruno Haible
2018-08-12 22:24     ` John Zaitseff
2018-08-12 22:35       ` Bruno Haible
2018-08-12 22:21   ` Bruno Haible
2020-09-27 10:33   ` Bruno Haible

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180723091714.4hoqu5op7puxchm3@zap.org.au \
    --to=j.zaitseff@zap.org.au \
    --cc=bug-gnulib@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).