Blogs / Personal blogs

Evan Klitzke

eklitzke.org

Popular posts
9
Total points
1,907
HN comments
1,965
Rank
#889 personal

Visit eklitzke.org → On Hacker News Nov 2016 – Oct 2022

Software Engineering 6Tools & Productivity 4Systems & Performance 4Security & Privacy 1Math & Algorithms 1Programming Languages 1

1

Beware of strncpy and strncat

Most C programmers also know to avoid the legacy strcpy() and strcat() functions, as these commonly introduce buffer-overflow problems. Instead, C programmers should use the newer strncpy() and strncat() functions, which check the size of the buffer they're copying data into.