ion of 'i' shadows a
previous local
../../gllib/vasnprintf.c:6183:57: warning: declaration of 'i' shadows a
previous local
2025-04-26 Bruno Haible
vasnprintf: Fix -Wshadow=local warnings.
* lib/vasnprintf.c (VASNPRINTF): Rename local variable 'i
patch fixes it.
2025-04-11 Bruno Haible
vasnprintf: Fix memory size bound for %g with grouping and precision.
* lib/vasnprintf.c (MAX_ROOM_NEEDED): For %g, consider also the size of
the thousands separators.
diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
index a07c137
27; failed
Aborted (core dumped)
This patch fixes it.
2025-04-10 Bruno Haible
vasnprintf: Fix handling of # flag in %b, %B directives.
* lib/vasnprintf.c (VASNPRINTF): In the prec_ourselves code, treat a 0b
prefix like a 0x prefix.
diff --git a/lib/vasnprintf.c b/li
Bruno Haible writes:
> These two patches fix the bug and add the unit test. Will push once savannah
> is up again.
Seems to be up now. I think it was down since last night/early this
morning so I couldn't pull any of your previous patches either.
Collin
5 Bruno Haible
c-vasnprintf: Fix link errors.
* modules/c-vasnprintf (configure.ac): Ensure printf-args.c and
printf-parse.c get compiled. Invoke gl_PREREQ_PRINTF_ARGS,
gl_PREREQ_PRINTF_PARSE.
>From 82791096e9320f4fbf0390f7fa7e06e49b4c9672 Mon Sep 17 00:00:00 2001
t_function): Likewise.
* tests/unistdio/test-ulc-vasnprintf3.c (test_function): Likewise.
u*-vasnprintf: Fix handling of %ls, %lc directives on Solaris, MSVC.
* lib/vasnprintf.c (VASNPRINTF): When implementing the %ls, %lc
directives ourselves: Rename variable '
aible
unistdio/u*-vasnprintf: Fix conversion of %Id directive result.
* lib/vasnprintf.c (VASNPRINTF): Don't assume that snprintf's result is
entirely ASCII if the directive contain the glibc 'I' flag.
diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
index bd13002e98..8e
On 12/08/2014 07:24 AM, Eric Blake wrote:
It might make sense to have a variant of 'free' that preserves errno,
>but we should probably give the variant a different name. 'noerr_free',
>say.
I'm not sure a variant is needed; if we can get glibc to guarantee the
POSIX proposal now, then we would
On 12/07/2014 07:29 PM, Paul Eggert wrote:
> Pádraig Brady wrote:
>> BTW if free() may reset errno on some platforms then it's
>> probably worth augmenting the gnulib free() wrapper
>> to restore errno if needed,
>
> The documented GNU behavior for 'free' allows 'free' to set errno,
> right? So w
ble to take advantage of portably.
Hence I pushed the attached to address this.
thanks,
Pádraig.
From ec6a60bfd9ba0f12ec07809636891909ee7ded66 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?=
Date: Mon, 8 Dec 2014 09:46:38 +
Subject: [PATCH] vasnprintf: fix potential incorrect e
Pádraig Brady wrote:
BTW if free() may reset errno on some platforms then it's
probably worth augmenting the gnulib free() wrapper
to restore errno if needed,
The documented GNU behavior for 'free' allows 'free' to set errno, right? So
why should the corresponding gnulib wrapper guarantee beh
On 06/12/14 16:06, Pádraig Brady wrote:
> On 06/12/14 02:46, Eric Blake wrote:
>> On 12/05/2014 06:23 PM, Pádraig Brady wrote:
>>> * lib/vasnprintf.c (VASNPRINTF): Fix free-memory read,
>>> flagged by clang-analyzer 3.4.2.
>>> ---
>>> ChangeLo
On 06/12/14 02:46, Eric Blake wrote:
> On 12/05/2014 06:23 PM, Pádraig Brady wrote:
>> * lib/vasnprintf.c (VASNPRINTF): Fix free-memory read,
>> flagged by clang-analyzer 3.4.2.
>> ---
>> ChangeLog| 6 ++
>> lib/vasnprintf.c | 2 +-
>> 2 fil
On 12/05/2014 06:23 PM, Pádraig Brady wrote:
> * lib/vasnprintf.c (VASNPRINTF): Fix free-memory read,
> flagged by clang-analyzer 3.4.2.
> ---
> ChangeLog| 6 ++
> lib/vasnprintf.c | 2 +-
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
> +++ b/lib/va
* lib/vasnprintf.c (VASNPRINTF): Fix free-memory read,
flagged by clang-analyzer 3.4.2.
---
ChangeLog| 6 ++
lib/vasnprintf.c | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 1c4a7ab..41207ea 100644
--- a/ChangeLog
+++ b/ChangeLog
A comment was wrong.
2011-10-15 Bruno Haible
vasnprintf: Fix comments.
* lib/vasnprintf.c (decode_long_double, decode_double): Fix comments.
--- lib/vasnprintf.c.orig Sat Oct 15 12:12:49 2011
+++ lib/vasnprintf.cSat Oct 15 12:12:46 2011
@@ -885,9 +885,9 @@
y
This fixes two syntax errors in the libintl build, inside gettext:
2010-05-09 Bruno Haible
vasnprintf: Fix syntax errors in libintl build on mingw.
* lib/vasnprintf.c (VASNPRINTF): Move a closing brace. Undefine
pad_ourselves and prec_ourselves after use.
--- lib
This fixes a buffer overrun on OSF/1 4.0 and Solaris 2.5. Nothing to worry
about for the majority of the platforms.
2008-03-30 Bruno Haible <[EMAIL PROTECTED]>
Fix buffer overrun.
* lib/vasnprintf.c (VASNPRINTF): If !USE_SNPRINTF && pad_ourselves:
Don't consider the wid
The vasnprintf fix from 2007-11-03 has the effect that when a reallocation
is needed, the snprintf() result will fit but the test _whether_ the snprintf()
result did fit fails, so that another round of reallocation is performed.
Inefficient...
2007-11-09 Bruno Haible <[EMAIL PROTEC
Eric Blake wrote:
> I have fixed some memory handling bugs that were in newlib at the time
> cygwin 1.5.24 was released.
They were probably due to the BSD heritage of some parts of newlib?
Another question is how to deal with the bug on MacOS X ? This is a
widely used platform, and there are seve
Bruno Haible clisp.org> writes:
> Now that you say it, it's obvious what is going on: the code has first
> decided that it doesn't need the 'a'/'A' substitute (since Cygwin already
> has it) and then decided that it needs to emulate 'A'/'A' (because Cygwin
> either crashes in low-memory situation
Hello Eric,
> Something's still fishy. Now I'm getting aborts for test-vasprintf-posix.c
> on
> cygwin, with the following sequence of instructions in vasnprintf.c:
>
> Breakpoint 1, test_function (my_asprintf=0x413052 )
> at ../../tests/test-vasprintf-posix.c:173
> 173 int retval =
Eric Blake byu.net> writes:
> Something's still fishy. Now I'm getting aborts for test-vasprintf-posix.c
on
> cygwin
git bisect narrowed it down to this commit:
7cd87873c8336cb43c0452df4b11238f014be8a1 is first bad commit
commit 7cd87873c8336cb43c0452df4b11238f014be8a1
Author: Bruno Haible <
Bruno Haible clisp.org> writes:
>
> The floating-point output code crashed due to an abort() for values with
> large exponents (> 1e34 for 'double'). This fixes it.
>
> 2007-11-04 Bruno Haible clisp.org>
>
> * lib/vasnprintf.c (scale10_round_decimal_decoded): Fix shift loop.
Somethin
The floating-point output code crashed due to an abort() for values with
large exponents (> 1e34 for 'double'). This fixes it.
2007-11-04 Bruno Haible <[EMAIL PROTECTED]>
* lib/vasnprintf.c (scale10_round_decimal_decoded): Fix shift loop.
--- lib/vasnprintf.c.orig 2007-11-04 14:5
On OSF/1 5.1, the printf() and fprintf() replacements no longer produced
output of more than 1999 bytes. Wh...
2007-11-03 Bruno Haible <[EMAIL PROTECTED]>
* lib/vasnprintf.c (VASNPRINTF): Don't assume that snprintf's return
value is C99 compliant.
Needed for OSF/1 5
The out-of-memory handling of gnulib's *printf replacement is broken: it
sometimes sets errno to EINVAL instead of ENOMEM. This fixes it.
2007-11-03 Bruno Haible <[EMAIL PROTECTED]>
Fix out-of-memory handling of vasnprintf.
* lib/printf-parse.c: Include .
(PRINTF_PARSE):
This fixes a problem that would only be noticeable on platform without
'long double' support.
2007-03-24 Bruno Haible <[EMAIL PROTECTED]>
* lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
include isnanl-nolibm.h.
*** lib/vasnprintf.c22 Mar 2007 02:04:01
Eric Blake wrote:
> since vasnprintf has the
> nice API property that, unlike all other *printf functions, it does not
> return an int, it should not need to be limited by INT_MAX; otherwise you
> are introducing an artificial limitation
You're right; I forgot about this argumentation. My patch co
Performing the unit tests on NetBSD 3.0 uncovered this: When the "size of
given buffer" argument passed to vasnprintf() was > INT_MAX, the function
could loop endlessly instead of failing with EOVERFLOW.
Note: NetBSD also has a bug here: snprintf() returns -1 with errno = EINVAL,
where POSIX says
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Bruno Haible on 3/17/2007 6:32 PM:
> * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
> (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
> larger than INT_MAX, or when it grow to a value larger t
31 matches
Mail list logo