Initialize addrsize to 0 and add a check for this before doing the memcpy.
Add simple Makefile
Change '#ifdef DEBUG' to '#if DEBUG'
Update README.md to mention building with 'make'.