Earlier quoted context omitted.
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.
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?
Best of show – abuse of libc
81–84 of 84 posts
Re: Best of show – abuse of libc
#82Re: Best of show – abuse of libc
#83Earlier quoted context omitted.
In the late 90s, looking for "printf(string)" [0] in the code was a great way to discover remote code execution 0days ;-) [0] should be "printf("%s", string)".
Very much so, it took a long time for this to become obvious as a security problem. My memory wuftpd was the first big program to suffer from this class of attacks.
Re: Best of show – abuse of libc
#84Earlier quoted context omitted.
dyld on Darwin has an API to ask if any pointer is to a read-only section of a binary. It’s useful because you can e.g. skip strcpys and other allocations.
Hmm, can you tell me more? I can't think of any situation where skipping on a strcpy is legal, since you provide the second buffer and so the copy must occur. And I know that there is heavy uniquing going on for things like selectors and CFStrings at compile time, but where is the dyld API being used at runtime?