Added a NetBeans project, attempted to fix a buffer overrun