...
At compile time, string literals are used to create an array of static duration and sufficient length to contain the character sequence and a nullNULL-termination character. It is unspecified whether these arrays are distinct. The behavior is undefined if a program attempts to modify string literals but frequently results in an access violation, as string literals are typically stored in read-only memory.
...
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
References
Wiki Markup |
---|
\[[ISO/IEC 9899-1999|AA. C References#ISO/IEC 9899-1999]\] Section 6.4.5, "String literals" \[[Summit 95|AA. C References#Summit 95]\] comp.lang.c FAQ list - Question 1.32 \[[Plum 91|AA. C References#Plum 91]\] Topic 1.26, "strings - string literals" |