|
|
|
|
|
by simias
2336 days ago
|
|
That's not UB, that's implementation dependent, AFAIK the C standard says nothing about read-only memory. Attempting to modify a string literal is indeed UB but that would only happen if an attacker managed to attempt to modify the string, not when the program is used normally. |
|
If we're being pedantic, it's _unspecified behaviour_. The implementation isn't required to document how it would behave.