mheinsen / seec

Program visualization and debugging for novice C programmers
http://seec-team.github.io/seec/
MIT License
3 stars 0 forks source link

strncpy sets state of entire region when string is shorter. #27

Closed mheinsen closed 11 years ago

mheinsen commented 11 years ago

Investigate possible bug with strncpy setting the length of the entire destination memory region regardless of the length of the string.

mheinsen commented 11 years ago

This is the correct behaviour. See http://en.cppreference.com/w/cpp/string/byte/strncpy.