From 97424321ac195b2138ac477f841c43ed88e25e9b Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Mon, 16 Jul 2012 12:50:28 +0100 Subject: [PATCH] memory error in vips_sign() --- libvips/arithmetic/sign.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvips/arithmetic/sign.c b/libvips/arithmetic/sign.c index d6430914..72dc5d8e 100644 --- a/libvips/arithmetic/sign.c +++ b/libvips/arithmetic/sign.c @@ -57,7 +57,7 @@ typedef VipsUnaryClass VipsSignClass; G_DEFINE_TYPE( VipsSign, vips_sign, VIPS_TYPE_UNARY ); #define CSIGN( TYPE ) { \ - TYPE *p = (TYPE *) in; \ + TYPE *p = (TYPE *) in[0]; \ TYPE *q = (TYPE *) out; \ int x; \ \ @@ -82,7 +82,7 @@ G_DEFINE_TYPE( VipsSign, vips_sign, VIPS_TYPE_UNARY ); } #define SIGN( TYPE ) { \ - TYPE *p = (TYPE *) in; \ + TYPE *p = (TYPE *) in[0]; \ signed char *q = (signed char *) out; \ int x; \ \