Hello community,

here is the log from the commit of package imlib2 for openSUSE:Factory checked 
in at 2016-05-05 13:19:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/imlib2 (Old)
 and      /work/SRC/openSUSE:Factory/.imlib2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "imlib2"

Changes:
--------
--- /work/SRC/openSUSE:Factory/imlib2/imlib2.changes    2016-03-20 
11:47:51.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.imlib2.new/imlib2.changes       2016-05-05 
13:19:04.000000000 +0200
@@ -1,0 +2,25 @@
+Sun May  1 17:27:34 UTC 2016 - [email protected]
+
+- Update to 1.4.9
+  * Fix cross-endianness for masks (1-bit depth images)
+  * gif: fix oob reads w/bad colormaps
+  * Fix "assuming signed overflow does not occur" warning.
+  * Fix some "variable set but not used" warnings.
+  * Fix some "variable might be clobbered" warnings.
+  * Fix off-by-one OOB read in __imlib_MergeUpdate().
+  * Revert "gif: fix oob reads w/bad colormaps"
+  * GIF loader: Fix out-of-bound reads from colormap.
+  * GIF loader: Remove check made redundant by previous commit.
+  * GIF loader: Reduce progress checks from per-pixel to per-row.
+  * GIF loader: Indent.
+  * Fix potential divide-by-zero in imlib_image_draw_ellipse().
+  * Make a number of functions static.
+  * Eliminate pImlibExternalFilter type.
+  * Trivial file function cleanups.
+  * Move __imlib_ItemInList() to file.c.
+  * Fix various potential OOM crashes.
+  * Fix integer overflow resulting in insufficient heap allocation
+  * loader_xpm: remove nonsense/impossible/broken condition
+  * Harden API and internals against overly large images
+
+-------------------------------------------------------------------

Old:
----
  imlib2-1.4.8.tar.bz2

New:
----
  imlib2-1.4.9.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ imlib2.spec ++++++
--- /var/tmp/diff_new_pack.4kIH3t/_old  2016-05-05 13:19:05.000000000 +0200
+++ /var/tmp/diff_new_pack.4kIH3t/_new  2016-05-05 13:19:05.000000000 +0200
@@ -18,7 +18,7 @@
 
 %define lname  libImlib2-1
 Name:           imlib2
-Version:        1.4.8
+Version:        1.4.9
 Release:        0
 Summary:        Image handling and conversion library
 License:        BSD-3-Clause
@@ -26,6 +26,8 @@
 Url:            http://sourceforge.net/projects/enlightenment/
 Source:         
http://downloads.sourceforge.net/project/enlightenment/imlib2-src/%{version}/%{name}-%{version}.tar.bz2
 Patch1:         imlib2-bswap.patch
+BuildRequires:  autoconf
+BuildRequires:  automake
 BuildRequires:  freetype2-devel
 BuildRequires:  giflib-devel
 BuildRequires:  libid3tag-devel
@@ -33,6 +35,7 @@
 BuildRequires:  libpng-devel
 BuildRequires:  libtiff-devel
 BuildRequires:  libtool
+BuildRequires:  pkgconfig
 BuildRequires:  xorg-x11-libX11-devel
 BuildRequires:  xorg-x11-libXext-devel
 BuildRequires:  zlib-devel
@@ -99,7 +102,7 @@
 %patch1
 
 %build
-autoreconf --force --install
+autoreconf -fiv
 %configure \
 %ifarch %ix86
        --enable-mmx \

++++++ imlib2-1.4.8.tar.bz2 -> imlib2-1.4.9.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/ChangeLog new/imlib2-1.4.9/ChangeLog
--- old/imlib2-1.4.8/ChangeLog  2016-03-12 08:50:05.000000000 +0100
+++ new/imlib2-1.4.9/ChangeLog  2016-04-29 19:52:10.000000000 +0200
@@ -1,5 +1,39 @@
 
 ***
+*** Version 1.4.9 ***
+***
+
+Alexander Smirnov (1):
+      Fix cross-endianness for masks (1-bit depth images)
+
+Bernhard Übelacker (1):
+      gif: fix oob reads w/bad colormaps
+
+Kim Woelders (16):
+      Fix "assuming signed overflow does not occur" warning.
+      Fix some "variable set but not used" warnings.
+      Fix some "variable might be clobbered" warnings.
+      Fix off-by-one OOB read in __imlib_MergeUpdate().
+      Revert "gif: fix oob reads w/bad colormaps"
+      GIF loader: Fix out-of-bound reads from colormap.
+      GIF loader: Remove check made redundant by previous commit.
+      GIF loader: Reduce progress checks from per-pixel to per-row.
+      GIF loader: Indent.
+      Fix potential divide-by-zero in imlib_image_draw_ellipse().
+      Make a number of functions static.
+      Eliminate pImlibExternalFilter type.
+      Trivial file function cleanups.
+      Move __imlib_ItemInList() to file.c.
+      Fix various potential OOM crashes.
+      1.4.9.
+
+Yuriy M. Kaminskiy (3):
+      Fix integer overflow resulting in insufficient heap allocation
+      loader_xpm: remove nonsense/impossible/broken condition
+      Harden API and internals against overly large images
+
+
+***
 *** Version 1.4.8 ***
 ***
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/README new/imlib2-1.4.9/README
--- old/imlib2-1.4.8/README     2016-03-12 08:53:23.000000000 +0100
+++ new/imlib2-1.4.9/README     2016-04-29 19:52:49.000000000 +0200
@@ -1,4 +1,4 @@
-Imlib2 1.4.8
+Imlib2 1.4.9
 
 This is the Imlib 2 library - a library that does image file loading and
 saving as well as rendering, manipulation, arbitrary polygon support, etc.
@@ -36,7 +36,7 @@
 
 RPM: To build rpm packages:
   
-  sudo rpm -ta imlib2-1.4.8.tar.gz
+  sudo rpm -ta imlib2-1.4.9.tar.gz
 
 You will find rpm packages in your system /usr/src/redhat/* dirs (note you may
 not need to use sudo or root if you have your own ~/.rpmrc. see rpm documents
@@ -44,11 +44,11 @@
 
 DEB: To build deb packages:
 
-  tar zvf imlib2-1.4.8.tar.gz
-  cd imlib2-1.4.8
+  tar zvf imlib2-1.4.9.tar.gz
+  cd imlib2-1.4.9
   dpkg-buildpackage -us -uc -rfakeroot
   cd ..
-  rm -rf imlib2-1.4.8
+  rm -rf imlib2-1.4.9
 
 You will find all the debian source, binary etc. packages put in the directory
 where you first untarred the source tarball.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/configure new/imlib2-1.4.9/configure
--- old/imlib2-1.4.8/configure  2016-03-12 08:52:43.000000000 +0100
+++ new/imlib2-1.4.9/configure  2016-04-29 19:52:27.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for imlib2 1.4.8.
+# Generated by GNU Autoconf 2.69 for imlib2 1.4.9.
 #
 # Report bugs to <[email protected]>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='imlib2'
 PACKAGE_TARNAME='imlib2'
-PACKAGE_VERSION='1.4.8'
-PACKAGE_STRING='imlib2 1.4.8'
+PACKAGE_VERSION='1.4.9'
+PACKAGE_STRING='imlib2 1.4.9'
 PACKAGE_BUGREPORT='[email protected]'
 PACKAGE_URL=''
 
@@ -1383,7 +1383,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures imlib2 1.4.8 to adapt to many kinds of systems.
+\`configure' configures imlib2 1.4.9 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1457,7 +1457,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of imlib2 1.4.8:";;
+     short | recursive ) echo "Configuration of imlib2 1.4.9:";;
    esac
   cat <<\_ACEOF
 
@@ -1596,7 +1596,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-imlib2 configure 1.4.8
+imlib2 configure 1.4.9
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1965,7 +1965,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by imlib2 $as_me 1.4.8, which was
+It was created by imlib2 $as_me 1.4.9, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2902,7 +2902,7 @@
 
 # Define the identity of the package.
  PACKAGE='imlib2'
- VERSION='1.4.8'
+ VERSION='1.4.9'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -13355,7 +13355,7 @@
 
 
 VERSION_CUR=5
-VERSION_REV=8
+VERSION_REV=9
 VERSION_AGE=4
 lt_version=${VERSION_CUR}:${VERSION_REV}:${VERSION_AGE}
 
@@ -16370,7 +16370,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by imlib2 $as_me 1.4.8, which was
+This file was extended by imlib2 $as_me 1.4.9, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -16436,7 +16436,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-imlib2 config.status 1.4.8
+imlib2 config.status 1.4.9
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/configure.ac 
new/imlib2-1.4.9/configure.ac
--- old/imlib2-1.4.8/configure.ac       2016-03-12 08:48:30.000000000 +0100
+++ new/imlib2-1.4.9/configure.ac       2016-04-29 17:45:02.000000000 +0200
@@ -1,7 +1,7 @@
 # get rid of that stupid cache mechanism
 rm -f config.cache
 
-AC_INIT([imlib2], [1.4.8], [[email protected]])
+AC_INIT([imlib2], [1.4.9], [[email protected]])
 AC_CONFIG_SRCDIR(configure.ac)
 AC_CONFIG_MACRO_DIR([m4])
 AC_CANONICAL_BUILD
@@ -23,7 +23,7 @@
 LT_INIT
 
 VERSION_CUR=5
-VERSION_REV=8
+VERSION_REV=9
 VERSION_AGE=4
 lt_version=${VERSION_CUR}:${VERSION_REV}:${VERSION_AGE}
 AC_SUBST(lt_version)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/imlib2.spec new/imlib2-1.4.9/imlib2.spec
--- old/imlib2-1.4.8/imlib2.spec        2016-03-12 08:53:23.000000000 +0100
+++ new/imlib2-1.4.9/imlib2.spec        2016-04-29 19:52:49.000000000 +0200
@@ -1,6 +1,6 @@
 Summary: Powerful image loading and rendering library
 Name: imlib2
-Version: 1.4.8
+Version: 1.4.9
 Release: 0.%(date '+%Y%m%d')
 License: BSD
 Group: System Environment/Libraries
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/src/bin/imlib2_bumpmap.c 
new/imlib2-1.4.9/src/bin/imlib2_bumpmap.c
--- old/imlib2-1.4.8/src/bin/imlib2_bumpmap.c   2016-02-07 08:10:42.000000000 
+0100
+++ new/imlib2-1.4.9/src/bin/imlib2_bumpmap.c   2016-03-21 09:16:35.000000000 
+0100
@@ -32,7 +32,7 @@
 main(int argc, char **argv)
 {
    int                 w, h, x, y;
-   Imlib_Image         im = NULL, im_bg = NULL;
+   Imlib_Image         im_bg;
    XEvent              ev;
    const char         *display_name = getenv("DISPLAY");
 
@@ -74,8 +74,6 @@
    imlib_context_set_color_modifier(NULL);
 
    im_bg = imlib_load_image(PACKAGE_DATA_DIR "/data/images/imlib2.png");
-   im = imlib_load_image(PACKAGE_DATA_DIR "/data/images/imlib2.png");
-
    imlib_context_set_image(im_bg);
    w = imlib_image_get_width();
    h = imlib_image_get_height();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/src/bin/imlib2_show.c 
new/imlib2-1.4.9/src/bin/imlib2_show.c
--- old/imlib2-1.4.8/src/bin/imlib2_show.c      2016-02-07 08:10:42.000000000 
+0100
+++ new/imlib2-1.4.9/src/bin/imlib2_show.c      2016-03-21 09:16:35.000000000 
+0100
@@ -80,7 +80,10 @@
    int                 scaleup = 0;
    int                 scaleboth = 0;
    int                 origone = 0;
+
+#if 0
    int                 bump_map_to_point = 0;
+#endif
    Imlib_Color_Modifier colormod = 0;
    ImlibPolygon        poly, poly2, poly3;
    int                 textdir = IMLIB_TEXT_TO_RIGHT;
@@ -158,8 +161,10 @@
            scaleup = 1;
         else if (!strcmp(argv[i], "-both"))
            scaleboth = 1;
+#if 0
         else if (!strcmp(argv[i], "-bmp2pt"))
            bump_map_to_point = 1;
+#endif
         else if (!strcmp(argv[i], "-orig"))
            origone = 1;
         else if (!strcmp(argv[i], "-blend"))
@@ -786,8 +791,8 @@
      }
    else if (interactive)
      {
-        int                 wo, ho, px, py, first = 1;
-        Imlib_Image         im_bg, im_sh1, im_sh2, im_sh3, im_ic[13], im_tmp;
+        int                 px, py, first = 1;
+        Imlib_Image         im_bg, im_sh1, im_sh2, im_sh3, im_ic[13];
 
         /* Imlib_Border border; */
         Imlib_Updates       up = NULL;
@@ -935,11 +940,8 @@
         else
            im_bg = imlib_load_image(PACKAGE_DATA_DIR "/data/images/bg.png");
         imlib_context_set_image(im_bg);
-        im_tmp = imlib_clone_image();
         w = imlib_image_get_width();
         h = imlib_image_get_height();
-        wo = w;
-        ho = h;
         w *= 1;
         h *= 1;
         XResizeWindow(disp, win, w, h);
@@ -1047,12 +1049,17 @@
                                                 imlib_image_get_height());
 
                }
-/*          
-            if( bump_map_to_point )
-              
imlib_apply_filter("bump_map_point(x=[],y=[],map=test_images/bulb.png);", &x, 
&y );
-            else
-              
imlib_apply_filter("bump_map(x=[],y=[],map=test_images/bulb.png);", &x, &y );
-*/
+
+#if 0
+             if (bump_map_to_point)
+                imlib_apply_filter
+                   ("bump_map_point(x=[],y=[],map=test_images/bulb.png);",
+                    &x, &y);
+             else
+                imlib_apply_filter
+                   ("bump_map(x=[],y=[],map=test_images/bulb.png);", &x, &y);
+#endif
+
              up = imlib_update_append_rect(up, 0, 0,
                                            imlib_image_get_width(),
                                            imlib_image_get_height());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/src/lib/Makefile.am 
new/imlib2-1.4.9/src/lib/Makefile.am
--- old/imlib2-1.4.8/src/lib/Makefile.am        2016-02-09 17:53:27.000000000 
+0100
+++ new/imlib2-1.4.9/src/lib/Makefile.am        2016-04-17 08:27:05.000000000 
+0200
@@ -47,6 +47,7 @@
 image.h \
 line.c \
 loaderpath.h \
+modules.c \
 polygon.c \
 rectangle.c \
 rend.c \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/src/lib/Makefile.in 
new/imlib2-1.4.9/src/lib/Makefile.in
--- old/imlib2-1.4.8/src/lib/Makefile.in        2016-03-12 08:52:46.000000000 
+0100
+++ new/imlib2-1.4.9/src/lib/Makefile.in        2016-04-29 19:52:31.000000000 
+0200
@@ -145,9 +145,9 @@
 am_libImlib2_la_OBJECTS = api.lo blend.lo color.lo color_helpers.lo \
        colormod.lo context.lo draw.lo dynamic_filters.lo ellipse.lo \
        file.lo filter.lo font_draw.lo font_load.lo font_main.lo \
-       font_query.lo grab.lo grad.lo image.lo line.lo polygon.lo \
-       rectangle.lo rend.lo rgba.lo rgbadraw.lo rotate.lo scale.lo \
-       script.lo span.lo updates.lo ximage.lo
+       font_query.lo grab.lo grad.lo image.lo line.lo modules.lo \
+       polygon.lo rectangle.lo rend.lo rgba.lo rgbadraw.lo rotate.lo \
+       scale.lo script.lo span.lo updates.lo ximage.lo
 am__EXTRA_libImlib2_la_SOURCES_DIST = amd64_blend.S amd64_blend_cmod.S \
        asm_blend.S asm_blend_cmod.S asm_rgba.S asm_rotate.S \
        asm_scale.S
@@ -423,6 +423,7 @@
 image.h \
 line.c \
 loaderpath.h \
+modules.c \
 polygon.c \
 rectangle.c \
 rend.c \
@@ -572,6 +573,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grad.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/line.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modules.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polygon.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rectangle.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rend.Plo@am__quote@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/src/lib/api.c 
new/imlib2-1.4.9/src/lib/api.c
--- old/imlib2-1.4.8/src/lib/api.c      2016-02-09 17:53:55.000000000 +0100
+++ new/imlib2-1.4.9/src/lib/api.c      2016-04-17 08:27:05.000000000 +0200
@@ -1976,7 +1976,7 @@
    DATA32             *data;
 
    CHECK_CONTEXT(ctx);
-   if ((width <= 0) || (height <= 0))
+   if (!IMAGE_DIMENSIONS_OK(width, height))
       return NULL;
    data = malloc(width * height * sizeof(DATA32));
    if (data)
@@ -2010,7 +2010,7 @@
    CHECK_CONTEXT(ctx);
    CHECK_PARAM_POINTER_RETURN("imlib_create_image_using_data", "data", data,
                               NULL);
-   if ((width <= 0) || (height <= 0))
+   if (!IMAGE_DIMENSIONS_OK(width, height))
       return NULL;
    im = __imlib_CreateImage(width, height, data);
    if (im)
@@ -2039,7 +2039,7 @@
    CHECK_CONTEXT(ctx);
    CHECK_PARAM_POINTER_RETURN("imlib_create_image_using_copied_data", "data",
                               data, NULL);
-   if ((width <= 0) || (height <= 0))
+   if (!IMAGE_DIMENSIONS_OK(width, height))
       return NULL;
    im = __imlib_CreateImage(width, height, NULL);
    if (!im)
@@ -2085,6 +2085,8 @@
    char                domask = 0;
 
    CHECK_CONTEXT(ctx);
+   if (!IMAGE_DIMENSIONS_OK(width, height))
+      return NULL;
    if (mask)
      {
         domask = 1;
@@ -2131,6 +2133,8 @@
    ImlibImage         *im;
 
    CHECK_CONTEXT(ctx);
+   if (!IMAGE_DIMENSIONS_OK(width, height))
+      return NULL;
    im = __imlib_CreateImage(width, height, NULL);
    im->data = malloc(width * height * sizeof(DATA32));
    __imlib_GrabXImageToRGBA(im->data, 0, 0, width, height,
@@ -2181,6 +2185,10 @@
    Pixmap              p, m;
 
    CHECK_CONTEXT(ctx);
+   if (!IMAGE_DIMENSIONS_OK(source_width, source_height))
+      return NULL;
+   if (!IMAGE_DIMENSIONS_OK(destination_width, destination_height))
+      return NULL;
    if ((mask) || (get_mask_from_shape))
       domask = 1;
    p = XCreatePixmap(ctx->display, ctx->drawable, destination_width,
@@ -2375,6 +2383,10 @@
       im_old->loader->load(im_old, NULL, 0, 1);
    if (!(im_old->data))
       return NULL;
+   /* Note: below check should've ensured by original image allocation,
+    * but better safe than sorry. */
+   if (!IMAGE_DIMENSIONS_OK(im_old->w, im_old->h))
+      return NULL;
    im = __imlib_CreateImage(im_old->w, im_old->h, NULL);
    if (!(im))
       return NULL;
@@ -2423,6 +2435,8 @@
    CHECK_CONTEXT(ctx);
    CHECK_PARAM_POINTER_RETURN("imlib_create_cropped_image", "image",
                               ctx->image, NULL);
+   if (!IMAGE_DIMENSIONS_OK(abs(width), abs(height)))
+      return NULL;
    CAST_IMAGE(im_old, ctx->image);
    if ((!(im_old->data)) && (im_old->loader) && (im_old->loader->load))
       im_old->loader->load(im_old, NULL, 0, 1);
@@ -2479,6 +2493,8 @@
    CHECK_CONTEXT(ctx);
    CHECK_PARAM_POINTER_RETURN("imlib_create_cropped_scaled_image", "image",
                               ctx->image, NULL);
+   if (!IMAGE_DIMENSIONS_OK(abs(destination_width), abs(destination_height)))
+      return NULL;
    CAST_IMAGE(im_old, ctx->image);
    if ((!(im_old->data)) && (im_old->loader) && (im_old->loader->load))
       im_old->loader->load(im_old, NULL, 0, 1);
@@ -4681,6 +4697,9 @@
    dx = (int)(cos(angle) * _ROTATE_PREC_MAX);
    dy = -(int)(sin(angle) * _ROTATE_PREC_MAX);
 
+   if (!IMAGE_DIMENSIONS_OK(sz, sz))
+      return NULL;
+
    im = __imlib_CreateImage(sz, sz, NULL);
    im->data = calloc(sz * sz, sizeof(DATA32));
    if (!(im->data))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/src/lib/dynamic_filters.c 
new/imlib2-1.4.9/src/lib/dynamic_filters.c
--- old/imlib2-1.4.8/src/lib/dynamic_filters.c  2016-02-09 17:53:55.000000000 
+0100
+++ new/imlib2-1.4.9/src/lib/dynamic_filters.c  2016-04-17 08:27:05.000000000 
+0200
@@ -15,10 +15,9 @@
 #include "dynamic_filters.h"
 #include "file.h"
 #include "image.h"
-#include "loaderpath.h"
 #include "script.h"
 
-static pImlibExternalFilter filters = NULL;
+static ImlibExternalFilter *filters = NULL;
 static int          dyn_initialised = 0;
 
 #define MALLOCSHOW
@@ -27,7 +26,7 @@
 #define FDEBUG
 */
 
-pImlibExternalFilter
+static ImlibExternalFilter *
 __imlib_LoadFilter(char *file)
 {
    ImlibExternalFilter *ptr;
@@ -99,7 +98,7 @@
 #ifdef FDEBUG
         printf("DEBUG: Loading Filters\n");
 #endif
-        list = __imlib_ListFilters(&num_filters);
+        list = __imlib_ListModules("filters", &num_filters);
         for (i = num_filters - 1; i >= 0; i--)
           {
              tptr = NULL;
@@ -125,10 +124,10 @@
 {
 }
 
-pImlibExternalFilter
+ImlibExternalFilter *
 __imlib_get_dynamic_filter(char *name)
 {
-   pImlibExternalFilter f_ptr;
+   ImlibExternalFilter *f_ptr;
    int                 i = 0;
 
    /* scan the filters */
@@ -148,40 +147,3 @@
      }
    return NULL;
 }
-
-/* loader dir */
-char              **
-__imlib_ListFilters(int *num_ret)
-{
-   char              **list = NULL, **l, *s;
-   int                 num, i, pi = 0;
-
-   *num_ret = 0;
-   /* same for system loader path */
-   s = (char *)malloc(sizeof(SYS_LOADERS_PATH) + 8 + 1);
-   sprintf(s, SYS_LOADERS_PATH "/filters");
-   l = __imlib_FileDir(s, &num);
-   if (num > 0)
-     {
-        *num_ret += num;
-        list = realloc(list, sizeof(char *) * *num_ret);
-        for (i = 0; i < num; i++)
-          {
-             s = (char *)realloc(s,
-                                 sizeof(SYS_LOADERS_PATH) + 9 + strlen(l[i]) +
-                                 1);
-             sprintf(s, SYS_LOADERS_PATH "/filters/%s", l[i]);
-             list[pi + i] = strdup(s);
-          }
-        __imlib_FileFreeDirList(l, num);
-     }
-   free(s);
-
-   /* List currently contains *everything in there* we need to weed out
-    * the .so, .la, .a versions of the same loader or whatever else.
-    * dlopen can take an extension-less name and do the Right Thing
-    * with it, so that's what we'll give it. */
-   list = __imlib_TrimLoaderList(list, num_ret);
-
-   return list;
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/src/lib/dynamic_filters.h 
new/imlib2-1.4.9/src/lib/dynamic_filters.h
--- old/imlib2-1.4.8/src/lib/dynamic_filters.h  2016-02-09 17:53:27.000000000 
+0100
+++ new/imlib2-1.4.9/src/lib/dynamic_filters.h  2016-04-17 08:27:05.000000000 
+0200
@@ -1,7 +1,6 @@
 #ifndef _DYNAMIC_FILTERS_H_
 #define _DYNAMIC_FILTERS_H_
 
-#include "common.h"
 #include "script.h"
 
 struct imlib_filter_info {
@@ -13,7 +12,6 @@
 };
 
 typedef struct _imlib_external_filter ImlibExternalFilter;
-typedef struct _imlib_external_filter *pImlibExternalFilter;
 
 struct _imlib_external_filter {
    char               *name;
@@ -27,13 +25,11 @@
    void                (*deinit_filter) (void);
    void               *(*exec_filter) (char *filter, void *im,
                                        pIFunctionParam params);
-   pImlibExternalFilter next;
+   ImlibExternalFilter *next;
 };
 
 void                __imlib_dynamic_filters_init(void);
 void                __imlib_dynamic_filters_deinit(void);
-pImlibExternalFilter __imlib_get_dynamic_filter(char *name);
-char              **__imlib_ListFilters(int *num_ret);
-pImlibExternalFilter __imlib_LoadFilter(char *file);
+ImlibExternalFilter *__imlib_get_dynamic_filter(char *name);
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/src/lib/ellipse.c 
new/imlib2-1.4.9/src/lib/ellipse.c
--- old/imlib2-1.4.8/src/lib/ellipse.c  2016-02-07 08:10:42.000000000 +0100
+++ new/imlib2-1.4.9/src/lib/ellipse.c  2016-04-13 22:18:20.000000000 +0200
@@ -71,6 +71,9 @@
         if (IN_RANGE(rx, by, clw, clh))
            pfunc(color, bp + len);
 
+        if (dx < 1)
+           dx = 1;
+
         dy += b2;
         yy -= ((dy << 16) / dx);
         lx--;
@@ -123,6 +126,9 @@
         if (IN_RANGE(rx, by, clw, clh))
            pfunc(color, bp + len);
 
+        if (dy < 1)
+           dy = 1;
+
         dx -= a2;
         xx += ((dx << 16) / dy);
         ty++;
@@ -222,6 +228,9 @@
         if (IN_RANGE(rx, by, clw, clh))
            pfunc(col1, bp + len);
 
+        if (dx < 1)
+           dx = 1;
+
         dy += b2;
         yy -= ((dy << 16) / dx);
         lx--;
@@ -295,6 +304,9 @@
         if (IN_RANGE(rx, by, clw, clh))
            pfunc(col1, bp + len);
 
+        if (dy < 1)
+           dy = 1;
+
         dx -= a2;
         xx += ((dx << 16) / dy);
         ty++;
@@ -395,6 +407,9 @@
         if (IN_RANGE(rx, by, clw, clh))
            pfunc(color, bp + len);
 
+        if (dx < 1)
+           dx = 1;
+
         dy += b2;
         yy -= ((dy << 16) / dx);
         lx--;
@@ -453,6 +468,9 @@
         if (((unsigned)by < (unsigned)clh) && (len > 0))
            sfunc(color, bpp, len);
 
+        if (dy < 1)
+           dy = 1;
+
         dx -= a2;
         xx += ((dx << 16) / dy);
         ty++;
@@ -556,6 +574,9 @@
         if (IN_RANGE(rx, by, clw, clh))
            pfunc(col1, bp + len);
 
+        if (dx < 1)
+           dx = 1;
+
         dy += b2;
         yy -= ((dy << 16) / dx);
         lx--;
@@ -629,6 +650,9 @@
         if (IN_RANGE(rx, by, clw, clh))
            pfunc(col1, bp + len);
 
+        if (dy < 1)
+           dy = 1;
+
         dx -= a2;
         xx += ((dx << 16) / dy);
         ty++;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/src/lib/file.c 
new/imlib2-1.4.9/src/lib/file.c
--- old/imlib2-1.4.8/src/lib/file.c     2016-02-09 17:53:55.000000000 +0100
+++ new/imlib2-1.4.9/src/lib/file.c     2016-04-17 08:27:05.000000000 +0200
@@ -240,7 +240,7 @@
 }
 
 char              **
-__imlib_FileDir(char *dir, int *num)
+__imlib_FileDir(const char *dir, int *num)
 {
    int                 i, dirlen;
    int                 done = 0;
@@ -249,12 +249,12 @@
    struct dirent      *dp;
 
    if ((!dir) || (!*dir))
-      return (0);
+      return 0;
    dirp = opendir(dir);
    if (!dirp)
      {
         *num = 0;
-        return (NULL);
+        return NULL;
      }
    /* count # of entries in dir (worst case) */
    for (dirlen = 0; (dp = readdir(dirp)); dirlen++);
@@ -262,12 +262,12 @@
      {
         closedir(dirp);
         *num = dirlen;
-        return (NULL);
+        return NULL;
      }
    names = (char **)malloc(dirlen * sizeof(char *));
 
    if (!names)
-      return (NULL);
+      return NULL;
 
    rewinddir(dirp);
    for (i = 0; i < dirlen;)
@@ -303,7 +303,7 @@
                }
           }
      }
-   return (names);
+   return names;
 }
 
 void
@@ -315,16 +315,14 @@
       if (l[num])
          free(l[num]);
    free(l);
-   return;
 }
 
 void
-__imlib_FileDel(char *s)
+__imlib_FileDel(const char *s)
 {
    if ((!s) || (!*s))
       return;
    unlink(s);
-   return;
 }
 
 int
@@ -332,7 +330,7 @@
 {
    struct stat         st;
 
-   return ((stat(s, &st) != -1) && (S_ISREG(st.st_mode)));
+   return (stat(s, &st) != -1) && (S_ISREG(st.st_mode));
 }
 
 time_t
@@ -380,7 +378,7 @@
 
    if ((uid == usr_uid) && (usr_s))
      {
-        return (strdup(usr_s));
+        return strdup(usr_s);
      }
 
    pwd = getpwuid(uid);
@@ -389,8 +387,26 @@
         s = strdup(pwd->pw_dir);
         if (uid == usr_uid)
            usr_s = strdup(s);
-        return (s);
+        return s;
      }
 
    return NULL;
 }
+
+int
+__imlib_ItemInList(char **list, int size, char *item)
+{
+   int                 i;
+
+   if (!list)
+      return 0;
+   if (!item)
+      return 0;
+
+   for (i = 0; i < size; i++)
+     {
+        if (!strcmp(list[i], item))
+           return 1;
+     }
+   return 0;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/src/lib/file.h 
new/imlib2-1.4.9/src/lib/file.h
--- old/imlib2-1.4.8/src/lib/file.h     2014-12-20 17:08:07.000000000 +0100
+++ new/imlib2-1.4.9/src/lib/file.h     2016-04-16 21:06:19.000000000 +0200
@@ -1,5 +1,5 @@
-#ifndef __FILE
-#define __FILE 1
+#ifndef __FILE_H
+#define __FILE_H 1
 
 #include "common.h"
 
@@ -9,13 +9,17 @@
 int                 __imlib_FileExists(const char *s);
 int                 __imlib_FileIsFile(const char *s);
 int                 __imlib_FileIsDir(const char *s);
-char              **__imlib_FileDir(char *dir, int *num);
+char              **__imlib_FileDir(const char *dir, int *num);
 void                __imlib_FileFreeDirList(char **l, int num);
-void                __imlib_FileDel(char *s);
+void                __imlib_FileDel(const char *s);
 time_t              __imlib_FileModDate(const char *s);
 char               *__imlib_FileHomeDir(int uid);
 int                 __imlib_FilePermissions(const char *s);
 int                 __imlib_FileCanRead(const char *s);
 int                 __imlib_IsRealFile(const char *s);
 
+int                 __imlib_ItemInList(char **list, int size, char *item);
+
+char              **__imlib_ListModules(const char *what, int *num_ret);
+
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/src/lib/font_draw.c 
new/imlib2-1.4.9/src/lib/font_draw.c
--- old/imlib2-1.4.8/src/lib/font_draw.c        2016-02-09 17:53:55.000000000 
+0100
+++ new/imlib2-1.4.9/src/lib/font_draw.c        2016-04-17 08:27:05.000000000 
+0200
@@ -81,10 +81,11 @@
    __imlib_font_query_advance(fn, text, &w, NULL);
    h = __imlib_font_max_ascent_get(fn) - __imlib_font_max_descent_get(fn);
 
-   data = malloc(w * h * sizeof(DATA32));
+   if (!IMAGE_DIMENSIONS_OK(w, h))
+      return;
+   data = calloc(w * h, sizeof(DATA32));
    if (!data)
       return;
-   memset(data, 0, w * h * sizeof(DATA32));
    /* TODO check if this is the right way of rendering. Esp for huge sizes */
    im2 = __imlib_CreateImage(w, h, data);
    if (!im2)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/src/lib/image.c 
new/imlib2-1.4.9/src/lib/image.c
--- old/imlib2-1.4.8/src/lib/image.c    2016-02-09 17:53:55.000000000 +0100
+++ new/imlib2-1.4.9/src/lib/image.c    2016-04-16 21:15:51.000000000 +0200
@@ -17,6 +17,8 @@
 #include "image.h"
 #include "loaderpath.h"
 
+static void         __imlib_LoadAllLoaders(void);
+
 static ImlibImage  *images = NULL;
 
 #ifdef BUILD_X11
@@ -560,7 +562,7 @@
 
 /* try dlopen()ing the file if we succeed finish filling out the malloced */
 /* loader struct and return it */
-ImlibLoader        *
+static ImlibLoader *
 __imlib_ProduceLoader(char *file)
 {
    ImlibLoader        *l;
@@ -592,110 +594,8 @@
    return l;
 }
 
-/* list all the filenames of loaders  in the system loaders dir and the user */
-/* loader dir */
-char              **
-__imlib_ListLoaders(int *num_ret)
-{
-   char              **list = NULL, **l, *s;
-   int                 num, i, pi = 0;
-
-   *num_ret = 0;
-   /* same for system loader path */
-   s = (char *)malloc(sizeof(SYS_LOADERS_PATH) + 8 + 1);
-   sprintf(s, SYS_LOADERS_PATH "/loaders");
-   l = __imlib_FileDir(s, &num);
-   if (num > 0)
-     {
-        *num_ret += num;
-        list = realloc(list, sizeof(char *) * *num_ret);
-
-        for (i = 0; i < num; i++)
-          {
-             s = (char *)realloc(s,
-                                 sizeof(SYS_LOADERS_PATH) + 9 + strlen(l[i]) +
-                                 1);
-             sprintf(s, SYS_LOADERS_PATH "/loaders/%s", l[i]);
-             list[pi + i] = strdup(s);
-          }
-        __imlib_FileFreeDirList(l, num);
-     }
-   free(s);
-
-   /* List currently contains *everything in there* we need to weed out
-    * the .so, .la, .a versions of the same loader or whatever else.
-    * dlopen can take an extension-less name and do the Right Thing
-    * with it, so that's what we'll give it. */
-   list = __imlib_TrimLoaderList(list, num_ret);
-
-   return list;
-}
-
-char              **
-__imlib_TrimLoaderList(char **list, int *num)
-{
-   int                 i, n, size = 0;
-
-   char              **ret = NULL;
-
-   if (!list)
-      return NULL;
-   if (*num == 0)
-      return list;
-
-   n = *num;
-
-   for (i = 0; i < n; i++)
-     {
-        char               *ext;
-
-        if (!list[i])
-           continue;
-        ext = strrchr(list[i], '.');
-        if ((ext) && (
-#ifdef __CYGWIN__
-                        (!strcasecmp(ext, ".dll")) ||
-#endif
-                        (!strcasecmp(ext, ".so"))))
-          {
-             /* Don't add the same loader multiple times... */
-             if (!__imlib_ItemInList(ret, size, list[i]))
-               {
-                  ret = realloc(ret, sizeof(char *) * (size + 1));
-
-                  ret[size++] = strdup(list[i]);
-               }
-          }
-        if (list[i])
-           free(list[i]);
-     }
-   free(list);
-   *num = size;
-   return ret;
-}
-
-int
-__imlib_ItemInList(char **list, int size, char *item)
-{
-   int                 i;
-
-   if (!size)
-      return 0;
-   if (!list)
-      return 0;
-   if (!item)
-      return 0;
-
-   for (i = 0; i < size; i++)
-     {
-        if (!strcmp(list[i], item))
-           return 1;
-     }
-   return 0;
-}
-
 /* fre the struct for a loader and close its dlopen'd handle */
-void
+static void
 __imlib_ConsumeLoader(ImlibLoader * l)
 {
    if (l->file)
@@ -713,7 +613,7 @@
    free(l);
 }
 
-void
+static void
 __imlib_RescanLoaders(void)
 {
    static time_t       last_scan_time = 0;
@@ -764,14 +664,14 @@
 
 /* find all the loaders we can find and load them up to see what they can */
 /* load / save */
-void
+static void
 __imlib_LoadAllLoaders(void)
 {
    int                 i, num;
    char              **list;
 
    /* list all the loaders imlib can find */
-   list = __imlib_ListLoaders(&num);
+   list = __imlib_ListModules("loaders", &num);
    /* no loaders? well don't load anything */
    if (!list)
       return;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/src/lib/image.h 
new/imlib2-1.4.9/src/lib/image.h
--- old/imlib2-1.4.8/src/lib/image.h    2014-12-20 17:09:17.000000000 +0100
+++ new/imlib2-1.4.9/src/lib/image.h    2016-04-16 21:06:19.000000000 +0200
@@ -135,14 +135,7 @@
 void                __imlib_RemoveImagePixmapFromCache(ImlibImagePixmap * ip);
 void                __imlib_CleanupImagePixmapCache(void);
 #endif
-ImlibLoader        *__imlib_ProduceLoader(char *file);
-char              **__imlib_ListLoaders(int *num_ret);
-char              **__imlib_TrimLoaderList(char **list, int *num);
-int                 __imlib_ItemInList(char **list, int size, char *item);
-void                __imlib_ConsumeLoader(ImlibLoader * l);
-void                __imlib_RescanLoaders(void);
 void                __imlib_RemoveAllLoaders(void);
-void                __imlib_LoadAllLoaders(void);
 ImlibLoader        *__imlib_FindBestLoaderForFile(const char *file,
                                                   int for_save);
 ImlibLoader        *__imlib_FindBestLoaderForFileFormat(const char *file,
@@ -188,7 +181,8 @@
 
 /* The maximum pixmap dimension is 65535. */
 /* However, for now, use 46340 (46340^2 < 2^31) to avoid buffer overflow 
issues. */
-#define X_MAX_DIM 46340
+/* Reduced further to 32767, so that (w * h * sizeof(DATA32)) won't exceed 
ULONG_MAX */
+#define X_MAX_DIM 32767
 
 #define IMAGE_DIMENSIONS_OK(w, h) \
    ( ((w) > 0) && ((h) > 0) && ((w) < X_MAX_DIM) && ((h) < X_MAX_DIM) )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/src/lib/modules.c 
new/imlib2-1.4.9/src/lib/modules.c
--- old/imlib2-1.4.8/src/lib/modules.c  1970-01-01 01:00:00.000000000 +0100
+++ new/imlib2-1.4.9/src/lib/modules.c  2016-04-17 08:27:05.000000000 +0200
@@ -0,0 +1,88 @@
+#include "config.h"
+
+#include <stdlib.h>
+
+#include "file.h"
+#include "image.h"
+#include "loaderpath.h"
+
+static char       **
+__imlib_TrimLoaderList(char **list, int *num)
+{
+   int                 i, n, size = 0;
+
+   if (!list)
+      return NULL;
+
+   n = *num;
+
+   for (i = 0; i < n; i++)
+     {
+        char               *ext;
+
+        if (!list[i])
+           continue;
+        ext = strrchr(list[i], '.');
+        if ((ext) && (
+#ifdef __CYGWIN__
+                        (!strcasecmp(ext, ".dll")) ||
+#endif
+                        (!strcasecmp(ext, ".so"))))
+          {
+             /* Don't add the same loader multiple times... */
+             if (!__imlib_ItemInList(list, size, list[i]))
+               {
+                  list[size++] = list[i];
+                  continue;
+               }
+          }
+        free(list[i]);
+     }
+   if (!size)
+     {
+        free(list);
+        list = NULL;
+     }
+   else
+     {
+        list = realloc(list, size * sizeof(char *));
+     }
+   *num = size;
+   return list;
+}
+
+char              **
+__imlib_ListModules(const char *what, int *num_ret)
+{
+   char              **list = NULL, **l;
+   char                path[1024];
+   int                 num, i;
+
+   *num_ret = 0;
+
+   snprintf(path, sizeof(path), "%s/%s", SYS_LOADERS_PATH, what);
+   l = __imlib_FileDir(path, &num);
+   if (num <= 0)
+      return NULL;
+
+   list = malloc(num * sizeof(char *));
+   if (list)
+     {
+        for (i = 0; i < num; i++)
+          {
+             snprintf(path, sizeof(path), "%s/%s/%s",
+                      SYS_LOADERS_PATH, what, l[i]);
+             list[i] = strdup(path);
+          }
+        *num_ret = num;
+     }
+   __imlib_FileFreeDirList(l, num);
+
+   /* List currently contains *everything in there* we need to weed out
+    * the .so, .la, .a versions of the same loader or whatever else.
+    * dlopen can take an extension-less name and do the Right Thing
+    * with it, so that's what we'll give it. */
+   list = __imlib_TrimLoaderList(list, num_ret);
+
+   return list;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/src/lib/rend.c 
new/imlib2-1.4.9/src/lib/rend.c
--- old/imlib2-1.4.8/src/lib/rend.c     2016-02-09 17:53:55.000000000 +0100
+++ new/imlib2-1.4.9/src/lib/rend.c     2016-04-16 21:11:11.000000000 +0200
@@ -580,6 +580,9 @@
         dy1 = 0;
      }
 
+   if (!IMAGE_DIMENSIONS_OK(dw, dh))
+      return;
+
    __imlib_GetContext(d, v, cm, depth);
 
    back = __imlib_CreateImage(dw, dh, NULL);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/src/lib/updates.c 
new/imlib2-1.4.9/src/lib/updates.c
--- old/imlib2-1.4.8/src/lib/updates.c  2016-02-07 08:10:42.000000000 +0100
+++ new/imlib2-1.4.9/src/lib/updates.c  2016-04-16 21:16:56.000000000 +0200
@@ -109,26 +109,27 @@
           {
              if (T(x, y).used & T_USED)
                {
-                  int                 xx, yy, ww, hh, ok;
+                  int                 xx, yy, ww, hh, ok, xww;
 
                   for (xx = x + 1, ww = 1;
-                       (T(xx, y).used & T_USED) && (xx < tw); xx++, ww++);
+                       (xx < tw) && (T(xx, y).used & T_USED); xx++, ww++);
+                  xww = x + ww;
                   for (yy = y + 1, hh = 1, ok = 1;
                        (yy < th) && (ok); yy++, hh++)
                     {
-                       for (xx = x; xx < (x + ww); xx++)
+                       for (xx = x; xx < xww; xx++)
                          {
                             if (!(T(xx, yy).used & T_USED))
                               {
                                  ok = 0;
-                                 xx = x + ww;
                                  hh--;
+                                 break;
                               }
                          }
                     }
                   for (yy = y; yy < (y + hh); yy++)
                     {
-                       for (xx = x; xx < (x + ww); xx++)
+                       for (xx = x; xx < xww; xx++)
                           T(xx, yy).used = T_UNUSED;
                     }
                   nu = __imlib_AddUpdate(nu, (x << TB), (y << TB),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/src/lib/ximage.c 
new/imlib2-1.4.9/src/lib/ximage.c
--- old/imlib2-1.4.8/src/lib/ximage.c   2016-02-09 17:53:55.000000000 +0100
+++ new/imlib2-1.4.9/src/lib/ximage.c   2016-04-16 21:11:11.000000000 +0200
@@ -360,8 +360,10 @@
    /* (rather than the Xserver) */
 #ifdef WORDS_BIGENDIAN
    xim->byte_order = MSBFirst;
+   xim->bitmap_bit_order = MSBFirst;
 #else
    xim->byte_order = LSBFirst;
+   xim->bitmap_bit_order = LSBFirst;
 #endif
 
    /* return out image */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/src/modules/loaders/loader_gif.c 
new/imlib2-1.4.9/src/modules/loaders/loader_gif.c
--- old/imlib2-1.4.8/src/modules/loaders/loader_gif.c   2016-02-07 
08:10:42.000000000 +0100
+++ new/imlib2-1.4.9/src/modules/loaders/loader_gif.c   2016-04-07 
20:20:47.000000000 +0200
@@ -141,56 +141,51 @@
 
    if (im->loader || immediate_load || progress)
      {
+        DATA32              colormap[256];
+
         bg = gif->SBackGroundColor;
         cmap = (gif->Image.ColorMap ? gif->Image.ColorMap : gif->SColorMap);
+        memset(colormap, 0, sizeof(colormap));
+        if (cmap != NULL)
+          {
+             for (i = cmap->ColorCount > 256 ? 256 : cmap->ColorCount; i-- > 
0;)
+               {
+                  r = cmap->Colors[i].Red;
+                  g = cmap->Colors[i].Green;
+                  b = cmap->Colors[i].Blue;
+                  colormap[i] = (0xff << 24) | (r << 16) | (g << 8) | b;
+               }
+             /* if bg > cmap->ColorCount, it is transparent black already */
+             if (transp >= 0 && transp < 256)
+                colormap[transp] = bg >= 0 && bg < 256 ?
+                   colormap[bg] & 0x00ffffff : 0x00000000;
+          }
         im->data = (DATA32 *) malloc(sizeof(DATA32) * w * h);
         if (!im->data)
            goto quit;
 
-        if (!cmap)
-          {
-             /* No colormap? Now what?? Let's clear the image (and not segv) */
-             memset(im->data, 0, sizeof(DATA32) * w * h);
-             rc = 1;
-             goto finish;
-          }
-
         ptr = im->data;
-        per_inc = 100.0 / (((float)w) * h);
+        per_inc = 100.0 / (float)h;
         for (i = 0; i < h; i++)
           {
              for (j = 0; j < w; j++)
                {
-                  if (rows[i][j] == transp)
-                    {
-                       r = cmap->Colors[bg].Red;
-                       g = cmap->Colors[bg].Green;
-                       b = cmap->Colors[bg].Blue;
-                       *ptr++ = 0x00ffffff & ((r << 16) | (g << 8) | b);
-                    }
-                  else
-                    {
-                       r = cmap->Colors[rows[i][j]].Red;
-                       g = cmap->Colors[rows[i][j]].Green;
-                       b = cmap->Colors[rows[i][j]].Blue;
-                       *ptr++ = (0xff << 24) | (r << 16) | (g << 8) | b;
-                    }
-                  per += per_inc;
-                  if (progress && (((int)per) != last_per)
-                      && (((int)per) % progress_granularity == 0))
+                  *ptr++ = colormap[rows[i][j]];
+               }
+             per += per_inc;
+             if (progress && (((int)per) != last_per)
+                 && (((int)per) % progress_granularity == 0))
+               {
+                  last_per = (int)per;
+                  if (!(progress(im, (int)per, 0, last_y, w, i)))
                     {
-                       last_per = (int)per;
-                       if (!(progress(im, (int)per, 0, last_y, w, i)))
-                         {
-                            rc = 2;
-                            goto quit;
-                         }
-                       last_y = i;
+                       rc = 2;
+                       goto quit;
                     }
+                  last_y = i;
                }
           }
 
-      finish:
         if (progress)
            progress(im, 100, 0, last_y, w, h);
      }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/src/modules/loaders/loader_jpeg.c 
new/imlib2-1.4.9/src/modules/loaders/loader_jpeg.c
--- old/imlib2-1.4.8/src/modules/loaders/loader_jpeg.c  2016-02-09 
17:53:53.000000000 +0100
+++ new/imlib2-1.4.9/src/modules/loaders/loader_jpeg.c  2016-04-16 
21:03:10.000000000 +0200
@@ -214,10 +214,10 @@
    DATA8              *buf;
    DATA32             *ptr;
    JSAMPROW           *jbuf;
-   int                 y = 0, quality = 75, compression = 2;
+   int                 y, quality, compression;
    ImlibImageTag      *tag;
-   int                 i, j, pl = 0;
-   char                pper = 0;
+   int                 i, j, pl;
+   char                pper;
 
    /* no image data? abort */
    if (!im->data)
@@ -257,6 +257,7 @@
    /* saver modules */
 
    /* compression */
+   compression = 2;
    tag = __imlib_GetTag(im, "compression");
    if (tag)
      {
@@ -279,6 +280,9 @@
       quality = 100;
 
    /* set up jepg compression parameters */
+   y = 0;
+   pl = 0;
+   pper = 0;
    jpeg_set_defaults(&cinfo);
    jpeg_set_quality(&cinfo, quality, TRUE);
    jpeg_start_compress(&cinfo, TRUE);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/src/modules/loaders/loader_png.c 
new/imlib2-1.4.9/src/modules/loaders/loader_png.c
--- old/imlib2-1.4.8/src/modules/loaders/loader_png.c   2016-02-07 
08:10:42.000000000 +0100
+++ new/imlib2-1.4.9/src/modules/loaders/loader_png.c   2016-03-21 
09:16:44.000000000 +0100
@@ -18,7 +18,7 @@
 {
    png_uint_32         w32, h32;
    int                 w, h;
-   char                hasa = 0;
+   char                hasa;
    FILE               *f;
    png_structp         png_ptr = NULL;
    png_infop           info_ptr = NULL;
@@ -31,7 +31,9 @@
    f = fopen(im->real_file, "rb");
    if (!f)
       return 0;
+
    /* read header */
+   hasa = 0;
    if (!im->data)
      {
         unsigned char       buf[PNG_BYTES_TO_CHECK];
@@ -243,10 +245,8 @@
    png_infop           info_ptr;
    DATA32             *ptr;
    int                 x, y, j, interlace;
-   png_bytep           row_ptr, data = NULL;
+   png_bytep           row_ptr, data;
    png_color_8         sig_bit;
-   int                 pl = 0;
-   char                pper = 0;
    ImlibImageTag      *tag;
    int                 quality = 75, compression = 3, num_passes = 1, pass;
 
@@ -286,6 +286,7 @@
 #endif
      }
 
+   data = NULL;
    png_init_io(png_ptr, f);
    if (im->flags & F_HAS_ALPHA)
      {
@@ -374,7 +375,7 @@
              if (progress)
                {
                   char                per;
-                  int                 l;
+                  int                 l, pl = 0, pper = 0;
 
                   per = 100 * (pass + y / (float)im->h) / num_passes;
                   if ((per - pper) >= progress_granularity)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/imlib2-1.4.8/src/modules/loaders/loader_xpm.c 
new/imlib2-1.4.9/src/modules/loaders/loader_xpm.c
--- old/imlib2-1.4.8/src/modules/loaders/loader_xpm.c   2016-02-09 
17:53:55.000000000 +0100
+++ new/imlib2-1.4.9/src/modules/loaders/loader_xpm.c   2016-04-16 
21:16:10.000000000 +0200
@@ -510,8 +510,7 @@
              line = realloc(line, lsz);
           }
 
-        if (((ptr) && ((ptr - im->data) >= (w * h * (int)sizeof(DATA32)))) ||
-            ((context > 1) && (count >= pixels)))
+        if ((context > 1) && (count >= pixels))
            done = 1;
      }
 


Reply via email to