Use standard macro names
Fix buffer overflow
Merge pull request #1 from dionyziz/patch-1

Fix buffer overflow and use standard macro name