Paul Eggert wrote: > Please see the thread at > <http://lists.gnu.org/archive/html/bug-gnulib/2007-10/msg00253.html>.
Thanks Paul for digging out the thread. Andreas, we have to be clear what API gnulib should offer. (a) the ability to use %n in every format string, or (b) the ability to use %n in read-only format strings only, and reject them on writable format strings. Currently gnulib implements (a), because that is ISO C11. m4/printf.m4 makes sure that if the libc offers only (b), we override printf so that we get (a). If you think gnulib should implement (b), then 1. there would need to be an agreement about it, and your mail was incomplete because it did not tell us that your change is an intended deviation from ISO C11, 2. there would need to be a documentation change, 3. vasnprintf.c should be changed to reject uses of %n in writable memory, at least when _FORTIFY_SOURCE == 2 is in use but ideally always. I'm not particularly in favour of one, (a) or (b). But we should be clear about what API gnulib offers. Bruno