check the return value of fgets().

2009-01-26  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/curve-bend.c (p_load_pointfile): check the
	return value of fgets().


svn path=/trunk/; revision=27957
This commit is contained in:
Sven Neumann 2009-01-26 09:05:48 +00:00 committed by Sven Neumann
parent 0af5d238ae
commit bb0ca406ef
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2009-01-26 Sven Neumann <sven@gimp.org>
* plug-ins/common/curve-bend.c (p_load_pointfile): check the
return value of fgets().
2009-01-26 Michael Natterer <mitch@gimp.org>
* app/tools/gimpregionselecttool.c

View File

@ -889,7 +889,13 @@ p_load_pointfile (BenderDialog *cd,
l_pi = 0;
l_ci = 0;
fgets (l_buff, 2000 - 1, l_fp);
if (! fgets (l_buff, 2000 - 1, l_fp))
{
g_message (_("Error while reading '%s': %s"),
gimp_filename_to_utf8 (filename), g_strerror (errno));
return -1;
}
if (strncmp(l_buff, KEY_POINTFILE, strlen(KEY_POINTFILE)) == 0)
{
while (NULL != fgets (l_buff, 2000-1, l_fp))