Malloc fail will result in SEGSEV
harm-smits opened this issue · 0 comments
harm-smits commented
On get_next_line.c
line 66, you allocate an empty string. If the malloc fails, you then call ft_strchr
on the empty string you allocated. Since you don't check whether the string is valid in ft_strchr
, you will try and access the index of a NULL pointer, thus causing a segmentation fault.
Line 66 in e66f0f4