Advanced #Programming in the #UNIX Environment
sizeof != strlen
Now that we know how to use gdb(1), we use it to help us understand a common mistake made when programming in C: misunderstanding the unary 'sizeof' operator, which returns the _storage size of an expression or a data type_, not the length of a string or size of a dynamic buffer.
(This ultimately lead me to write the 'sizeof' manual page now included in #FreeBSD: https://man.freebsd.org/cgi/man.cgi?query=sizeof&apropos=0&sektion=0&manpath=FreeBSD+14.1-RELEASE+and+Ports&arch=default&format=html )