Commit 4831a428 authored by Mukund Sivaraman's avatar Mukund Sivaraman Committed by Mukund Sivaraman

Fixed a bug where a pointer to a gint is passed to a function which

2008-03-28  Mukund Sivaraman  <muks@mukund.org>

        * plug-ins/common/png.c: Fixed a bug where a pointer to a gint
        is passed to a function which expects gsize, which can cause
        out of bounds access.


svn path=/trunk/; revision=25291
parent a25d7c04
2008-03-28 Mukund Sivaraman <muks@mukund.org>
* plug-ins/common/png.c: Fixed a bug where a pointer to a gint
is passed to a function which expects gsize, which can cause
out of bounds access.
2008-03-28 Michael Natterer <mitch@gimp.org>
* app/gui/gui.c: #include <gdk/gdkx.h>
......
......@@ -1184,6 +1184,7 @@ save_image (const gchar *filename,
if (pngvals.comment)
{
GimpParasite *parasite;
gsize text_length = 0;
parasite = gimp_image_parasite_find (orig_image_ID, "gimp-comment");
if (parasite)
......@@ -1207,8 +1208,9 @@ save_image (const gchar *filename,
text->compression = PNG_TEXT_COMPRESSION_NONE;
text->text = g_convert (comment, -1,
"ISO-8859-1", "UTF-8",
NULL, &text->text_length,
NULL, &text_length,
NULL);
text->text_length = text_length;
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment