Make sure to specify buffer size large enough for NULL terminator