News for hackers. Stuff that matters.
Re:Best of show – abuse of libc by Narishma on Saturday January 09, 2021 @06:18AM (#25699464)
I'm pretty sure the compilers from Microsoft and Borland supported %n earlier than that. The earliest one I have easy access to that supports it is Microsoft C 4.0 from 1986.
Re:Best of show – abuse of libc by gambiting on Saturday January 09, 2021 @08:17AM (#25700112)
Does anyone know why it was introduced in the first place? I mean.....the return value of printf gives you the exact same information, no? Why give printf the ability to write anything in the first place?
Re:Best of show – abuse of libc by gambiting on Saturday January 09, 2021 @10:26AM (#25701071)
Ah, I found out why - %n prints out the number of characters printed up to the point where the %n is. Printf returns the total number of characters printed.