print_addr now takes a length

print_addr writes to a char * passed to it, but there's no arg for
the length of the buffer making buffer overflow more likely.  This
commit adds a length arg.