Fix issue detected by static analysis tool
[platform/core/uifw/isf.git] / ism / src / ltdl.cpp
index 40805af..b4c9fb7 100644 (file)
@@ -3169,7 +3169,7 @@ try_dlopen (
 
          /* 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))