gimp r27957 - in trunk: . plug-ins/common



Author: neo
Date: Mon Jan 26 09:05:48 2009
New Revision: 27957
URL: http://svn.gnome.org/viewvc/gimp?rev=27957&view=rev

Log:
2009-01-26  Sven Neumann  <sven gimp org>

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



Modified:
   trunk/ChangeLog
   trunk/plug-ins/common/curve-bend.c

Modified: trunk/plug-ins/common/curve-bend.c
==============================================================================
--- trunk/plug-ins/common/curve-bend.c	(original)
+++ trunk/plug-ins/common/curve-bend.c	Mon Jan 26 09:05:48 2009
@@ -889,7 +889,13 @@
   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))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]