WAFer
WAFer copied to clipboard
Buffer overflow in nprintf()
nprintf does not check bounds of its buffer.
Example code:
char *testbuf = calloc(1, sizeof(char) * 1000001);
memset(testbuf, 'A', 1000000);
printf("Testbuf len: %ld\n", strlen(testbuf));
nprintf(client, testbuf);
nprintf() now uses vsnprintf() and will reallocate its buffer if not large enough.