Fix possible out of bounds access with non-null terminated buffers