mirror of https://github.com/GNOME/gimp.git
As we open the ppm file in binary mode, we shouldn't assume that the
* app/about_dialog.c (about_dialog_load_logo): As we open the ppm file in binary mode, we shouldn't assume that the header lines read with fgets end with just a '\n'.
This commit is contained in:
parent
46c38c74dc
commit
6a3010b17f
|
@ -1,3 +1,9 @@
|
|||
1999-06-03 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* app/about_dialog.c (about_dialog_load_logo): As we open the ppm
|
||||
file in binary mode, we shouldn't assume that the header lines
|
||||
read with fgets end with just a '\n'.
|
||||
|
||||
1999-06-02 Seth Burgess <sjburges@gimp.org>
|
||||
|
||||
* app/Makefile.am : Added new Files, indicator_area.[ch]
|
||||
|
|
|
@ -302,7 +302,8 @@ about_dialog_load_logo (GtkWidget *window)
|
|||
return 0;
|
||||
|
||||
fgets (buf, 1024, fp);
|
||||
if (strcmp (buf, "P6\n") != 0)
|
||||
|
||||
if (strncmp (buf, "P6", 2) != 0)
|
||||
{
|
||||
fclose (fp);
|
||||
return 0;
|
||||
|
@ -313,7 +314,7 @@ about_dialog_load_logo (GtkWidget *window)
|
|||
sscanf (buf, "%d %d", &logo_width, &logo_height);
|
||||
|
||||
fgets (buf, 1024, fp);
|
||||
if (strcmp (buf, "255\n") != 0)
|
||||
if (strncmp (buf, "255", 3) != 0)
|
||||
{
|
||||
fclose (fp);
|
||||
return 0;
|
||||
|
|
|
@ -302,7 +302,8 @@ about_dialog_load_logo (GtkWidget *window)
|
|||
return 0;
|
||||
|
||||
fgets (buf, 1024, fp);
|
||||
if (strcmp (buf, "P6\n") != 0)
|
||||
|
||||
if (strncmp (buf, "P6", 2) != 0)
|
||||
{
|
||||
fclose (fp);
|
||||
return 0;
|
||||
|
@ -313,7 +314,7 @@ about_dialog_load_logo (GtkWidget *window)
|
|||
sscanf (buf, "%d %d", &logo_width, &logo_height);
|
||||
|
||||
fgets (buf, 1024, fp);
|
||||
if (strcmp (buf, "255\n") != 0)
|
||||
if (strncmp (buf, "255", 3) != 0)
|
||||
{
|
||||
fclose (fp);
|
||||
return 0;
|
||||
|
|
|
@ -302,7 +302,8 @@ about_dialog_load_logo (GtkWidget *window)
|
|||
return 0;
|
||||
|
||||
fgets (buf, 1024, fp);
|
||||
if (strcmp (buf, "P6\n") != 0)
|
||||
|
||||
if (strncmp (buf, "P6", 2) != 0)
|
||||
{
|
||||
fclose (fp);
|
||||
return 0;
|
||||
|
@ -313,7 +314,7 @@ about_dialog_load_logo (GtkWidget *window)
|
|||
sscanf (buf, "%d %d", &logo_width, &logo_height);
|
||||
|
||||
fgets (buf, 1024, fp);
|
||||
if (strcmp (buf, "255\n") != 0)
|
||||
if (strncmp (buf, "255", 3) != 0)
|
||||
{
|
||||
fclose (fp);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue