| Previous | Next |
| STATUS_ACCESS_DENIED | STATUS_OBJECT_TYPE_MISMATCH |
STATUS_BUFFER_TOO_SMALL
STATUS_BUFFER_TOO_SMALL is an NTSTATUS error that usually means the output buffer is insufficient even for the required result representation. Unlike STATUS_BUFFER_OVERFLOW, it commonly means that no usable result was written. Many native APIs accompany the status with the required length or with enough information for a caller to issue the query again using a correctly sized buffer.
Do not confuse it with partial success
The two buffer statuses are intentionally different. Microsoft documents STATUS_BUFFER_OVERFLOW as a warning that can return partial information, while STATUS_BUFFER_TOO_SMALL is an error. Code that only checks whether a call returned “not success” and then reads the output anyway can process absent or incomplete data.
Recommended response
- Inspect the API's returned length field and its contract for zero-length probes.
- Allocate the documented size plus any required terminator or alignment, then repeat the call.
- Cap allocations when the size is derived from another process, device, or network server.
- Do not reuse stale contents from a previous successful buffer after a too-small result.
For a driver or protocol implementation, this status is often a normal part of a two-call query pattern rather than a system failure. The useful diagnostic is the requested versus required size, the queried information class, and the object being queried.
See Using NTSTATUS Values, FltGetVolumeProperties, and FSCTL_PIPE_PEEK status handling.
Looking for a different code? Search another status or error code.
