rpl_fprintf is wrongly being used on Ubuntu 18.04 due to:

$ cat test.c
/* gl_PRINTF_DIRECTIVE_N */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static char fmtstring[10];
static char buf[100];
int main ()
{
  int count = -1;
  /* Copy the format string.  Some systems (glibc with _FORTIFY_SOURCE=2)
     support %n in format strings in read-only memory but not in writable
     memory.  */
  strcpy (fmtstring, "%d %n");
  if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
      || strcmp (buf, "123 ") != 0
      || count != 4)
    return 1;
  return 0;
}
$ gcc -O2 test.c -o test && ./test
*** %n in writable segment detected ***
Aborted
$ 

cu
Adrian

Reply via email to