3 ms·
Why would Rust do anything weird when presented with the string "%p%s%s%s%s%n"?
by pshc 5y ago
Why would Rust do anything weird when presented with the string "%p%s%s%s%s%n"?
- junon 5y agoWhy would C?
- pshc 5y agoDo you want the obvious explanation? Because the string was passed into the format string parameter of some sprintf-like, a common mistake in C usually caught by warnings but seemingly ignored or suppressed in this case. edit: turns out from the analysis it was CFStringCreateWithFormatAndArguments, so yes, a sprintf-like used incorrectly