mirror of https://github.com/GNOME/gimp.git
Specify maximum field width in sscanf() to avoid buffer overflows.
2007-05-31 Mukund Sivaraman <muks@mukund.org> * plug-ins/gfig/gfig.c: Specify maximum field width in sscanf() to avoid buffer overflows. svn path=/trunk/; revision=22682
This commit is contained in:
parent
97ded8c030
commit
1bf9e5623a
|
@ -1,3 +1,8 @@
|
|||
2007-05-31 Mukund Sivaraman <muks@mukund.org>
|
||||
|
||||
* plug-ins/gfig/gfig.c: Specify maximum field width in sscanf() to
|
||||
avoid buffer overflows.
|
||||
|
||||
2007-05-31 Mukund Sivaraman <muks@mukund.org>
|
||||
|
||||
* plug-ins/common/spheredesigner.c: Don't write to an uninitialized
|
||||
|
|
|
@ -603,11 +603,11 @@ load_options (GFigObj *gfig,
|
|||
{
|
||||
/* Get option name */
|
||||
#ifdef DEBUG
|
||||
printf ("num = %d\n", sscanf (load_buf, "%s %s", str_buf, opt_buf));
|
||||
printf ("num = %d\n", sscanf (load_buf, "%255s %255s", str_buf, opt_buf));
|
||||
|
||||
printf ("option %s val %s\n", str_buf, opt_buf);
|
||||
#else
|
||||
sscanf (load_buf, "%s %s", str_buf, opt_buf);
|
||||
sscanf (load_buf, "%255s %255s", str_buf, opt_buf);
|
||||
#endif /* DEBUG */
|
||||
|
||||
if (!strcmp (str_buf, "GridSpacing:"))
|
||||
|
|
Loading…
Reference in New Issue