vetkit.c.memory.input-into-fixed-buffer
A command-line argument or environment variable is copied into a buffer with strcpy / strcat / sprintf, which does not check the destination size.
Last updated:
Suite: Security
c, cpp
A command-line argument or environment variable is copied into a buffer with strcpy / strcat / sprintf, which does not check the destination size.
Category: SECURITY · Engine rule severity: WARNING
How to fix it
Use snprintf(buf, sizeof buf, "%s", value) or strlcpy / strlcat and check the result for truncation, or allocate the buffer from strlen(value) + 1.
References
Source: packages/engine/rules/sast/c.yml.
Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.