Here is the output (see p.129 Writing Secure Code 2nd Ed. ) Address of bar = 00401070 Entering foo(). My stack looks like: ^ 04030201 (buf[3], buf[2], buf[1], buf[0]) | Lower memory address | 08070605 (buf[7], buf[6], buf[5], buf[4]) | Stack | 00000009