Chapter 7. Characters and Strings (STR)

Chapter Contents

Image

Risk Assessment Summary

Image

Image STR30-C. Do not attempt to modify string literals

According to the C Standard, 6.4.5, paragraph 3 [ISO/IEC 9899:2011]:

A character string literal is a sequence of zero or more multibyte characters enclosed in double-quotes, as in "xyz". A UTF−8 string literal is the same, except prefixed by u8. A wide string literal is the same, except prefixed by the letter L,

Get The CERT ® C Coding Standard: 98 Rules for Developing Safe, Reliable, and Secure Systems, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.