Change-Id: Ife5308b75417ae081868f33a83d9418df09b6488
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
/* Handle the case where we occasionally need to read a line
that is longer than the initial buffer size. */
- while ((line[LT_STRLEN(line) -1] != '\n') && (!feof (file)))
+ while (((LT_STRLEN(line) >= 1) && (line[LT_STRLEN(line) -1] != '\n')) && (!feof (file)))
{
line = LT_DLREALLOC (char, line, line_len *2);
if (!fgets (&line[line_len -1], (int) line_len +1, file))