Fixed array bounds overflow with NULL character