[babl] base: fix half reference conversion expecting zeroed target
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] base: fix half reference conversion expecting zeroed target
- Date: Sat, 16 Jan 2016 10:17:56 +0000 (UTC)
commit cc408deb86082737cf73c7d139f13a9bd56b1626
Author: Øyvind Kolås <pippin gimp org>
Date: Sat Jan 16 11:16:22 2016 +0100
base: fix half reference conversion expecting zeroed target
As discovered in bug #760703 the reference path is currently expecting
zeroed memory, fix by explicitly zeroing last 32bit of mantissa.
babl/base/type-half.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/babl/base/type-half.c b/babl/base/type-half.c
index e45e34a..57b5d7d 100644
--- a/babl/base/type-half.c
+++ b/babl/base/type-half.c
@@ -283,7 +283,7 @@ static void halfp2doubles(void *target, void *source, long numel)
*xp++ = (xs | xe | xm); // Combine sign bit, exponent bits, and mantissa bits
}
}
- xp++; // Skip over the remaining 32 bits of the mantissa
+ *xp++ = 0; // Skip over and zero the remaining 32 bits of the mantissa
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]