Fix invalid read in ft_split
authorLukas Jiriste <ljiriste@student.42prague.com>
Thu, 1 Aug 2024 10:03:40 +0000 (12:03 +0200)
committerLukas Jiriste <ljiriste@student.42prague.com>
Thu, 1 Aug 2024 10:03:40 +0000 (12:03 +0200)
commit61db70482c4aa1f7f3959148cd219c130dc63e91
tree206af06a9b06d73337e0b4c7765c1b5926b83f1b
parent1051b1e297072a56a09b9f559c6ab3c99a557509
Fix invalid read in ft_split

This read happens when the last word ends with the terminating '\0'.
After advancing the index to the '\0' it is then increased once more to
regions not accessible. This is fixed by simple skipping the ++i after a
word has been processed.
ft_str/ft_split.c