Null-terminated string: Difference between revisions

Content deleted Content added
edited in some more information
rewording
Line 1:
{{dablink|A number of [[stringed instrument]]s, including the [[viola]] and [[cello]], have a string that, when played open, produces the [[note|note C]]. This is usually referred to as the '''C string'''.}}
 
In computing, '''C strings''' are [[character string|character sequence]]s stored as one-dimensional [[character (computing)|character]] [[array]]s and terminated with a [[null character]] ('\0'). The name originatesrefers fromto the ubiquitous [[C programming language]] that usesusing this string representation, and is used elsewhere to distinguish this often-used representation from others.
 
The null-termination characteristic has historically created security problems related to the length of the string. If the null character is not put to the end of the string for some reason, any following non-related memory area is also processed as a part of the character sequence. This can lead to program crashes or leakage of program internal information to attackers or non-understanding users.