cuckoosandbox / cuckoomon

DEPRECATED - replaced with "monitor"
122 stars 82 forks source link

Ensure Optional Length Parameter #8

Closed jbremer closed 11 years ago

jbremer commented 12 years ago

Several functions offer an optional return length parameter, which is used to return the amount of bytes that were actually read / whatever. However, as they are optional, they might be set to NULL. Introduce ENSURE_DWORD and similar macro's which ensure that the parameter is set, i.e. if such parameter is NULL, then we assign it a stack value.

This will improve the dump buffer functionality, because otherwise we'd have to guess the length etc.