[babl] extensions/gegl-fixups: swap increments of src and dst in rgba8_rgb8



commit 0de7cce2cfe807d93a06f884b2fb4a8441fd6788
Author: Øyvind Kolås <pippin gimp org>
Date:   Wed Apr 4 16:41:51 2018 +0200

    extensions/gegl-fixups: swap increments of src and dst in rgba8_rgb8
    
    They were reversed, causing memory corruptions fixing bugs 794973 and 794972.

 extensions/gegl-fixups.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/extensions/gegl-fixups.c b/extensions/gegl-fixups.c
index d6ad912..fd0e6ed 100644
--- a/extensions/gegl-fixups.c
+++ b/extensions/gegl-fixups.c
@@ -455,8 +455,8 @@ conv_rgba8_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst,
   while (n--)
     {
       *(unsigned int *) dst = (*(unsigned int *) src);
-      src   += 3;
-      dst   += 4;
+      src   += 4;
+      dst   += 3;
     }
   dst[0] = src[0];
   dst[1] = src[1];


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]