> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codeant.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Snprintf return value length

<AccordionGroup>
  <Accordion title="snprintf-return-value-length">
    The return value of `snprintf` is the number of characters that would be written, excluding the NUL terminator. The return value must be validated before using it as a buffer index or buffer length.<br />**Likelihood**: LOW<br />**Confidence**: MEDIUM<br />**CWE**: <br />- CWE-787: Out-of-bounds Write
  </Accordion>
</AccordionGroup>
