Synopsis: | Do not use the same buffer for reading and writing when calling input/output functions. |
Language: | C |
Severity Level: | 1 |
Category: | Library |
Description: |
Justification If the same buffer is used the behavior is undefined. Example result = snprintf(mystring, STR_SIZE, "%s\n", mystring); /* WRONG */ result = snprintf(mynewstring, STR_SIZE, "%s\n", mystring); /* RIGHT */ |