Re: [PATCH] base32, base64: disallow non-canonical encodings

2023-10-27 Thread Simon Josefsson via Gnulib discussion list
Pádraig Brady writes: > To give a little more context, this will avoid > round trip issues like the following, by failing early: > > $ echo "HelloWorld==" | base64 -d | base64 > HelloWorlQ== Thanks for background and patches! There are use-cases for bad inputs (both for good and malicious p

Re: [PATCH] base32, base64: disallow non-canonical encodings

2023-10-27 Thread Pádraig Brady
On 27/10/2023 08:28, Simon Josefsson wrote: Pádraig Brady writes: To give a little more context, this will avoid round trip issues like the following, by failing early: $ echo "HelloWorld==" | base64 -d | base64 HelloWorlQ== Thanks for background and patches! There are use-cases for

Re: [PATCH] base32, base64: disallow non-canonical encodings

2023-10-27 Thread Simon Josefsson via Gnulib discussion list
Pádraig Brady writes: > However if there are good use-cases for bad inputs > we may need to adjust this patch, > rather than failing unconditionally. > > For example we could just flag non canonical input in the context, > and leave it up to the caller how to deal with that. That adds complexity

Re: [PATCH] base32, base64: disallow non-canonical encodings

2023-10-27 Thread Pádraig Brady
On 27/10/2023 10:23, Simon Josefsson wrote: Pádraig Brady writes: However if there are good use-cases for bad inputs we may need to adjust this patch, rather than failing unconditionally. For example we could just flag non canonical input in the context, and leave it up to the caller how to d

Re: [PATCH 2/3] isnanl-tests, stdio-tests: pacify GCC -Wshadow

2023-10-27 Thread Bruno Haible
Paul Eggert wrote: > @@ -66,39 +62,39 @@ main () > # endif >{ /* Quiet NaN. */ > static memory_long_double x = > - { LDBL80_WORDS (0x, 0xC333, 0x) }; > + { .word = LDBL80_WORDS (0x, 0xC333, 0x) }; > ASSERT (isnanl (x.value)); >} But the

new module 'fenv-rounding'

2023-10-27 Thread Bruno Haible
These patches add a module 'fenv-rounding', that implements the ISO C 99 functions fegetround fesetround Most platforms have these functions nowadays, and the unit tests have not uncovered any bugs. Therefore it's probably only relevant for portability to older Android versions. The most inte