|
|
|
|
|
by pilom
4652 days ago
|
|
There are 2 ways to handle strings:
1. All strings are prepended with a length variable
2. Use a NULL character to represent the end of the string The Unix guys originally chose option 2. To them it made sense because it used fewer extra bits and it allowed you to do strings of any arbitrary length. Unfortunately, every single buffer overflow bug is because of that decision. |
|