_vsprintf
function · crt · primitive
- Address
0x7412c1· 81 bytes, up to0x741311- Signature
int __cdecl (char *buffer, const char *format, va_list args)- Meaning
- Formats a va_list into a buffer with no bound through __output and ends it with a NUL
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- crt/printf#the-string-front-ends
- Test
crt::crt_snprintf_vsprintf_difftest
Finding: The string front ends in crt: formatted output
sprintf and _vsprintf give __output the count 0x7fffffff; _snprintf and _vsnprintf give
it the caller's count, as a signed int. One more decrement of the count then decides the end: at
zero or above, a NUL at the cursor; below zero, nothing. So a text shorter than the count ends in a
NUL and returns its length; a text of exactly the count has no NUL and returns the count; a longer
one stops at the count with no NUL and returns -1. A count of 0 or from 0x80000001 up leaves no
room: nothing is written, and the return is -1, or 0 for an empty text. 0x80000000 wraps to
0x7fffffff on its first decrement and has no bound.
The derivation is in the doc.
Callers 3
- ISStrVPrintf storm
- 0x65aa70 storm
- SLogVWrite storm
Callees 2
Calls and jumps by a bare address, from tables/calls.tsv.