62 lines
1.5 KiB
Plaintext
62 lines
1.5 KiB
Plaintext
$OpenBSD: patch-plug-ins_gflare_gflare_c,v 1.1 2005/07/08 07:50:56 fgsch Exp $
|
|
--- plug-ins/gflare/gflare.c.orig Tue Jun 28 14:06:04 2005
|
|
+++ plug-ins/gflare/gflare.c Tue Jun 28 14:09:07 2005
|
|
@@ -1347,7 +1347,7 @@ static void
|
|
gflare_read_double (gdouble *dblvar,
|
|
GFlareFile *gf)
|
|
{
|
|
- gchar buf[30];
|
|
+ gchar buf[31];
|
|
|
|
if (gf->error)
|
|
return;
|
|
@@ -1362,14 +1362,14 @@ static void
|
|
gflare_read_gradient_name (GradientName name,
|
|
GFlareFile *gf)
|
|
{
|
|
- gchar tmp[1024], dec[1024];
|
|
+ gchar tmp[1025], dec[1025];
|
|
|
|
if (gf->error)
|
|
return;
|
|
|
|
/* FIXME: this is buggy */
|
|
|
|
- if (fscanf (gf->fp, "%s", tmp) == 1)
|
|
+ if (fscanf (gf->fp, "%1024s", tmp) == 1)
|
|
{
|
|
/* @GRADIENT_NAME */
|
|
gradient_name_decode (dec, tmp);
|
|
@@ -1383,13 +1383,13 @@ static void
|
|
gflare_read_shape (GFlareShape *shape,
|
|
GFlareFile *gf)
|
|
{
|
|
- gchar tmp[1024];
|
|
+ gchar tmp[1025];
|
|
gint i;
|
|
|
|
if (gf->error)
|
|
return;
|
|
|
|
- if (fscanf (gf->fp, "%s", tmp) == 1)
|
|
+ if (fscanf (gf->fp, "%1024s", tmp) == 1)
|
|
{
|
|
for (i = 0; i < GF_NUM_SHAPES; i++)
|
|
if (strcmp (tmp, gflare_shapes[i]) == 0)
|
|
@@ -1405,13 +1405,13 @@ static void
|
|
gflare_read_mode (GFlareMode *mode,
|
|
GFlareFile *gf)
|
|
{
|
|
- gchar tmp[1024];
|
|
+ gchar tmp[1025];
|
|
gint i;
|
|
|
|
if (gf->error)
|
|
return;
|
|
|
|
- if (fscanf (gf->fp, "%s", tmp) == 1)
|
|
+ if (fscanf (gf->fp, "%1024s", tmp) == 1)
|
|
{
|
|
for (i = 0; i < GF_NUM_MODES; i++)
|
|
if (strcmp (tmp, gflare_modes[i]) == 0)
|