Slide 59
Slide 59 text
Buffer Over-read
Solutions depend on the language used
• Use only functions that verify the size of what is being
copied
• Functions that DO NOT verify: gets(), strcpy(), strcat(), sprintf(),
vsprintf(), scanf(), sscanf(), fscanf()
• Functions that should be used: strncpy(), strlcpy() and strlcat()
• Use functions that “end” a string with null char, as the
functions above
SOLUTION