<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libgpg-error/src/estream-printf.c, branch libgpg-error-1.60</title>
<subtitle>Error codes used by GnuPG et al.</subtitle>
<id>http://git.bktus.com/gpgfrontend/libgpg-error/atom?h=libgpg-error-1.60</id>
<link rel='self' href='http://git.bktus.com/gpgfrontend/libgpg-error/atom?h=libgpg-error-1.60'/>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/libgpg-error/'/>
<updated>2025-08-14T15:04:08Z</updated>
<entry>
<title>estream: Support the %b conversion specifier from C23</title>
<updated>2025-08-14T15:04:08Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2025-08-14T15:03:22Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/libgpg-error/commit/?id=6ac5332e4f6988112f4272cfe7a2eee31173ff3f'/>
<id>urn:sha1:6ac5332e4f6988112f4272cfe7a2eee31173ff3f</id>
<content type='text'>
* src/estream-printf.c (CONSSPEC_BIN): New.
(compute_type): Handle it.
(parse_format): Support 'b'.
(do_format): Divert 'b' to pr_integer.
(pr_integer): Print binary format.

* tests/t-printf.c (check_fprintf_sf): Add two simple testcases.
--

Might be handy in some cases and is easy to implement.  Minor drawback
is that this increases a stack based buffer from 100 to 150 bytes.
</content>
</entry>
<entry>
<title>estream: Fix call to string filter for estream-printf.</title>
<updated>2024-01-16T05:04:47Z</updated>
<author>
<name>NIIBE Yutaka</name>
<email>gniibe@fsij.org</email>
</author>
<published>2024-01-16T05:01:41Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/libgpg-error/commit/?id=4a9def77488f2631f71737357d9e9dd874c9b302'/>
<id>urn:sha1:4a9def77488f2631f71737357d9e9dd874c9b302</id>
<content type='text'>
* src/estream-printf.c (pr_string): Make sure to prepare
NUL-terminated string to call the string filter.

--

GnuPG-bug-id: 6737
Signed-off-by: NIIBE Yutaka &lt;gniibe@fsij.org&gt;
</content>
</entry>
<entry>
<title>estream: String filter should NOT be called with non-nul string.</title>
<updated>2023-09-27T02:01:31Z</updated>
<author>
<name>NIIBE Yutaka</name>
<email>gniibe@fsij.org</email>
</author>
<published>2023-09-27T02:01:31Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/libgpg-error/commit/?id=0fc740ffca848d17b8c71d1682de1e29b24db3cb'/>
<id>urn:sha1:0fc740ffca848d17b8c71d1682de1e29b24db3cb</id>
<content type='text'>
* src/estream-printf.c (pr_string): Call the string filter function SF
conditionally to avoid possible SEGV.

--

GnuPG-bug-id: 6737
Signed-off-by: NIIBE Yutaka &lt;gniibe@fsij.org&gt;
</content>
</entry>
<entry>
<title>Remove Windows CE support.</title>
<updated>2022-06-28T03:05:04Z</updated>
<author>
<name>NIIBE Yutaka</name>
<email>gniibe@fsij.org</email>
</author>
<published>2022-06-28T03:05:04Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/libgpg-error/commit/?id=14ead267268f8ed14bf1ab49189646a95654b706'/>
<id>urn:sha1:14ead267268f8ed14bf1ab49189646a95654b706</id>
<content type='text'>
* contrib/*: Remove.
* Makefile.am: Remove contrib.
* autogen.sh: Remove Windows CE support.
* configure.ac (have_w32ce_system): Remove.
* src/Makefile.am [HAVE_W32CE_SYSTEM] (extra_cppflags): Remove.
(gpg_extra_headers): Remove.
(EXTRA_DIST): Remove mkw32errmap.c and w32ce-add.h
(BUILT_SOURCES): Remove mkw32errmap.map.c.
(tmp_files): Remove mkw32errmap.tab.h mkw32errmap.map.c
(CLEANFILES): Likewise.
* src/estream-printf.c [HAVE_W32CE_SYSTEM]: Remove.
* src/estream.c [HAVE_W32CE_SYSTEM]: Remove.
* src/gpg-error.def.in [HAVE_W32CE_SYSTEM]: Remove.
* src/gpgrt-int.h: Fix comment.
* src/init.c [HAVE_W32CE_SYSTEM]: Remove.
* src/init.h [HAVE_W32CE_SYSTEM]: Remove.
* src/mkheader.c: Remove Windows CE support.
* src/mkw32errmap.c, src/w32ce-add.h: Remove.
* src/spawn-posix.c [HAVE_W32CE_SYSTEM]: Remove.
* src/spawn-w32.c [HAVE_W32CE_SYSTEM]: Remove.
* src/sysutils.c [HAVE_W32CE_SYSTEM]: Remove.
* src/w32-estream.c [HAVE_W32CE_SYSTEM]: Remove.
* src/w32-reg.c [HAVE_W32CE_SYSTEM]: Remove.
* tests/Makefile.am [HAVE_W32CE_SYSTEM]: Remove.

--

GnuPG-bug-id: 5912
Signed-off-by: NIIBE Yutaka &lt;gniibe@fsij.org&gt;
</content>
</entry>
<entry>
<title>estream: Fix dead assigniment.</title>
<updated>2019-09-08T17:38:01Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-09-08T17:38:01Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/libgpg-error/commit/?id=f7c24427329075adc98eb93d2abb12c087e0f9d2'/>
<id>urn:sha1:f7c24427329075adc98eb93d2abb12c087e0f9d2</id>
<content type='text'>
* src/estream-printf.c (pr_string): Here.
--

GnuPG-bug-id: 4698
Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: New functions gpgrt_abort and gpgrt_add_emergency_cleanup.</title>
<updated>2019-01-04T12:13:53Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-01-04T12:13:53Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/libgpg-error/commit/?id=933bfd7b652a907c0d8dd5337c6b5b9cb82ce7b7'/>
<id>urn:sha1:933bfd7b652a907c0d8dd5337c6b5b9cb82ce7b7</id>
<content type='text'>
* src/init.c (emergency_cleanup_list): New gloabl var.
(_gpgrt_add_emergency_cleanup): New.
(_gpgrt_abort): New. Repalce all calls to abort by this.  Also replace
all assert by either log_assert or a stderr output followed by a
_gpgrt_abort.
(run_emergency_cleanup): New.
* src/visibility.c (gpgrt_add_emergency_cleanup): New public API.
(gpgrt_abort): New public API.
--

Libgcrypt uses its own assert function which makes sure to terminate
the secure memory.  This is safe as log as an assert is triggered
internally in Libgcrypt.  GnuPG runs emergency cleanup handlers right
before log_fatal etc to tell Libgcrypt to terminate the secure memory.
With the move of the logging function to gpgrt in gnupg 2.3 this did
not anymore.  Thus we now provide a mechanism in gpgrt to do right
that.  Eventually Libgcrypt can also make use of this.

What this does not handle are calls to abort or failed asserts in
external libraries or in libc.  We can't do anything about it in a
library because a library may not setup signal handlers.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>estream: Use correct POSIX name THOUSEP.</title>
<updated>2018-12-12T08:14:31Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-12-12T08:07:04Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/libgpg-error/commit/?id=12349de46d241cfbadbdf99773d6cabfcbc97578'/>
<id>urn:sha1:12349de46d241cfbadbdf99773d6cabfcbc97578</id>
<content type='text'>
* src/estream-printf.c: Replace HAVE_LANGINFO_THOUSANDS_SEP by
HAVE_LANGINFO_THOUSEP.
(pr_integer): Use THOUSEP.
--

GnuPG-bug-id: 4286
Reported-by: miod
Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: New functions gpgrt_fprintf_sf anf gpgrt_fprintf_sf_unlocked.</title>
<updated>2018-11-26T19:22:24Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-11-26T19:22:24Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/libgpg-error/commit/?id=bd8668c120ac0f725edb092b2c4ca49ffdb78ed2'/>
<id>urn:sha1:bd8668c120ac0f725edb092b2c4ca49ffdb78ed2</id>
<content type='text'>
* src/gpg-error.h.in (gpgrt_string_filter_t): New type.
(gpgrt_fprintf_sf, gpgrt_fprintf_sf_unlocked): New.
* src/gpg-error.vers, src/gpg-error.def.in: Add them.
* src/visibility.c (gpgrt_fprintf_sf): New.
(gpgrt_fprintf_sf_unlocked): New.
* src/estream-printf.c (pr_string): Add and use args sf, sfvalue and
string_no.
(do_format): Add args sf and sfvalue.  Keep a string format counter.
(_gpgrt_estream_format): Add args sf and sfvalue.  Change all callers
to provide NULL for them.
* src/estream.c (_gpgrt_vfprintf_unlocked, _gpgrt_vfprintf): Add sf
and sfvalue and adjust all callers.
(do_print_stream): Ditto.

* tests/t-printf.c (stream_to_string): New.
(struct sfstate_s): New.
(string_filter): New.
(check_fprintf_sf): New.
(main): Call new test.
--

The actual reason to implement these functions is to enhance the
internal logging function with a filter to sanitized strings so that
control values or other things can be quoted.

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>core: Initialize values in estream_format</title>
<updated>2018-07-05T06:38:27Z</updated>
<author>
<name>Andre Heinecke</name>
<email>aheinecke@intevation.de</email>
</author>
<published>2018-07-04T16:19:42Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/libgpg-error/commit/?id=fe2f8fca3114e3a5727fdbbc5e7ebc4e442d0401'/>
<id>urn:sha1:fe2f8fca3114e3a5727fdbbc5e7ebc4e442d0401</id>
<content type='text'>
* src/estream-printf.c (_gpgrt_estream_format): Make sure
valuetable.value is inialized even on stack.

--
This makes the behavior more consistent with the calloc'ed
codepath for more then 8 variables.

It also fixes a potential crash if there were unmatched
format args provided.

GnuPG-Bug-Id: T4054
</content>
</entry>
<entry>
<title>Fix more misspellings.</title>
<updated>2016-11-18T01:45:25Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2016-11-15T23:52:44Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/libgpg-error/commit/?id=47f2f059732cad79486b48eca5cd8fc07dbc396b'/>
<id>urn:sha1:47f2f059732cad79486b48eca5cd8fc07dbc396b</id>
<content type='text'>
--

Signed-off-by: Daniel Kahn Gillmor &lt;dkg@fifthhorseman.net&gt;
</content>
</entry>
</feed>
