Commit Graph

38 Commits

Author SHA1 Message Date
Ell
66b92854f0 Bug 789436 - Fix out of boundary write in file-xmc.c.
Fix stupid mistake in last commit, by me :)
2017-10-24 20:05:15 -04:00
9a073508f7 Bug 789436 - Fix out of boundary write in file-xmc.c.
A malicious XMC file can contain an invalid TOC count, which could lead
to an out of boundary write on 32 bit systems due to integer overflow.

This error occurs during thumbnail creation.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2017-10-24 19:06:22 -04:00
e16c8a2352 Move the new "default_new_layer_mode" APIs to the image...
...in both the core and libgimp.

Images now know what the default mode for new layers is:

- NORMAL for empty images
- NORMAL for images with any non-legacy layer
- NORMAL_LEGAVY for images with only legacy layers

This changes behavior when layers are created from the UI, but *also*
when created by plug-ins (yes there is a compat issue here):

- Most (all?) single-layer file importers now create NORMAL layers
- Screenshot, Webpage etc also create NORMAL layers

Scripts that create images from scratch (logos etc) should not be
affected because they usually have NORMAL_LEGACY hardcoded.

3rd party plug-ins and scripts will also behave old-style unless they
get ported to gimp_image_get_default_new_layer_mode().
2017-08-21 20:18:00 +02:00
838449254a plug-ins: use gimp_get_default_new_layer_mode() for most new layers
instead of hardcoding NORMAL_LEGACY.
2017-08-20 17:12:46 +02:00
3cf423f0cd *: rename NORMAL to NORMAL_LEGACY and NORMAL_LINEAR to NORMAL
and make NORMAL_LEGACY immutable.
2017-02-26 16:26:34 +01:00
66060e3307 app, libgimp*, plug-ins: replace enum GimpLayerModeEffects by GimpLayerMode
with proper value names. Mark most values as _BROKEN because they use
weird alpha compositing that has to die. Move GimpLayerModeEffects to
libgimpbase, deprecate it, and set it as compat enum for GimpLayerMode.
Add the GimpLayerModeEffects values as compat constants to script-fu
and pygimp.
2017-01-08 23:00:19 +01:00
4df9a1d568 Get rid of gtk_misc_set_alignment(label) and use gtk_label_set_x,yalign() 2016-09-08 19:11:20 +02:00
47ef3be145 Initialize GValues with G_VALUE_INIT instead of { 0, } 2016-03-26 15:59:26 +01:00
ec27b539ea plug-ins: various s/save/export/ replacement on visible strings. 2016-02-16 02:35:43 +01:00
feb0790cc4 plug-ins: file-xmc: use GeglRectangle instead of GimpParamRegion 2015-10-31 19:10:51 +01:00
f5f88b8134 plug-ins: fix some compiler warnings in file-xmc
and some minor formatting cleanup.
2015-10-22 19:29:35 +02:00
9a245989c0 fix bogus checks against unsigned variables.
Spotted by Andrey Karpov using static code analysis:
   http://www.viva64.com/en/b/0273/
2014-08-16 00:37:13 +02:00
f28878b6d3 plug-ins: start the progress before opening files for loading/saving
so the user gets feedback as early as possible.
2014-07-23 21:37:13 +02:00
6914bbc65f plug-ins: more gimp_spin_button_new() -> gtk_spin_button_new() 2014-06-22 23:01:31 +02:00
0475868147 plug-ins: port file-xmc to GEGL 2014-01-01 23:59:48 +01:00
03df8c6af4 plug-ins: pass the format's name again in calls to gimp_export_image()
and clean up the formatting of the call and the lines around it. Now
we can check the various (disabled) export options for regressions
again by changing a single line in gimp_export_image().
2013-11-10 00:18:48 +01:00
6b0d1038cc Bug 692641 - Various spelling fixes 2013-01-27 18:59:02 +01:00
f3f72b720c Bug 677733 - Export image: duplicate list item for TIFF export
Don't register a second file procedure for extension-less exporting as
XMC, this approach is totally bogus. Fixes the duplicate XMC entry in
File->Export.
2012-11-01 19:17:53 +01:00
c021703914 Bug 668077 - Plural forms
The two plurals are always constant numbers, but use %d to substitute
the constant. Add translator comments.
2012-01-18 20:53:42 +01:00
ba720461a6 file-xmc: reword/fix UI messages 2011-12-29 17:34:15 +01:00
14796ef622 file-xmc: Drop redundant assignment 2011-10-12 17:23:44 +05:30
dcb4c6e34a plug-ins: use gtk_box_new() 2011-09-30 12:18:24 +02:00
841c8a7ebe String review: fix some spelling and formatting issues 2011-08-28 20:07:55 +02:00
be78ba448f file-xmc: Flush each drawable 2011-04-25 21:03:12 +05:30
8ff66342b8 plug-ins: set progress to 1.0 when done 2011-04-10 19:28:43 +02:00
8c4d99f883 Bug 645456 - Inconsistent window (role) naming scheme
Applied patch from Christoph Kappel which adds a "gimp-" prefix to all
plug-in dialog window roles.
2011-04-08 20:31:34 +02:00
87646e9ace libgimp: deprecate and rename the image parasite functions
in exactly the way the drawable functios were turned into item ones.
2011-03-08 13:19:21 +01:00
38fd77f5e9 plug-ins: some more s/gtk_container_add/gtk_box_pack_start/ 2011-03-05 10:59:56 +01:00
9853df88a1 plug-ins: Increase size of values array in file-xmc to allow for values[5] access 2010-10-07 17:55:36 +05:30
bbd7ec6b5c plug-ins: port from gimp_image_add_foo() to gimp_image_insert_foo()
I'm sure some plug-ins need to add their items *not* at the toplevel,
but since making plug-ins really tree-aware is a lot more work than
just fixing insert positions, I went for passing -1 as parent in
almost all cases. And because of laziness...
2010-09-06 11:40:46 +02:00
c6a2eaa5c4 plug-ins: use new item API instead of deprecated drawable API 2010-07-09 12:27:36 +02:00
e942d1e913 plug-ins: Remove bogus ) in file-xmc.c 2010-05-27 19:53:48 +02:00
ed6fa8d3f3 plug-ins: adjust user-visible strings for consistency 2010-05-21 22:19:24 +02:00
19fe919dce plug-ins: Port file plug-ins to new export API 2009-07-21 16:03:58 +02:00
e805cb0cf4 Use gtk_dialog_get_content_area() instead of dialog->vbox 2009-07-15 18:57:12 +02:00
780404699e plug-ins: Add missing #include<X11/Xlib.h> that is breaking build 2009-06-28 11:12:16 +02:00
030aa9b26d plug-ins: minor coding style adjustments in file-xmc.c 2009-06-02 21:11:34 +02:00
27cec2c3f2 plug-ins: add X11 Mouse Cursor plug-in
This commit adds a plug-in to read and write X11 mouse cursor files.
2009-06-02 21:11:06 +02:00