benilla-re systems structs docs

CDataStore::GetCString

function · base

Address
0x4191b0 · 300 bytes, up to 0x4192db
Signature
void * __thiscall (CDataStore *this, char *dest, uint32_t capacity)
Meaning
Copies a C string out of the store to a capacity; a missing NUL or overrun empties it and poisons the cursor
Confidence
verified, proof one
Name from
the community database (idb)
Finding
net/messages#data-store-strings-and-pointers
Test
net::datastore_heap, net::datastore_inline, net::datastore_window

Finding: Data store strings and pointers in net: messages

GetDataInSitu (0x419ac0, destination, n) first stores 0 in its destination, so a failed read gives a null pointer; on success it stores a pointer into the packet buffer and advances the cursor by n, copying nothing. GetCString (0x4191b0, destination, capacity) copies bytes up to and including the packet's NUL, a window at a time. When the cursor is past the size at exit it stores 0 at the destination's first byte: a string of capacity or more characters, or one with no NUL before the end of the packet, reads as "" and poisons the store. A null destination with a nonzero capacity sets error 87 and reads nothing.

The derivation is in the doc.

Callers 59

Callees 1

Calls and jumps by a bare address, from tables/calls.tsv.