pdb: Fix size in gimp_image_get_colormap

It looks like we left out the multiplication by 3 when passing the
colormap size to get to the number of bytes in commit 89c359ce

This fixes a crash when saving an XPM file

Fixes: https://gitlab.gnome.org/GNOME/gimp/-/issues/9711
This commit is contained in:
Niels De Graef 2023-07-08 23:06:48 +02:00
parent b9e49a3fd9
commit ed1ad72255
2 changed files with 2 additions and 2 deletions

View File

@ -1532,7 +1532,7 @@ image_get_colormap_invoker (GimpProcedure *procedure,
colormap_data = gimp_image_get_colormap (image);
colormap = g_bytes_new_take (colormap_data,
gimp_image_get_colormap_size (image));
3 * gimp_image_get_colormap_size (image));
}
return_vals = gimp_procedure_get_return_values (procedure, success,

View File

@ -1523,7 +1523,7 @@ HELP
colormap_data = gimp_image_get_colormap (image);
colormap = g_bytes_new_take (colormap_data,
gimp_image_get_colormap_size (image));
3 * gimp_image_get_colormap_size (image));
}
CODE
);