[Libreoffice-commits] core.git: external/libebook
Stephan Bergmann
sbergman at redhat.com
Mon Jan 12 07:30:57 PST 2015
external/libebook/UnpackedTarball_libebook.mk | 6 +++++-
external/libebook/ubsan.patch | 11 +++++++++++
2 files changed, 16 insertions(+), 1 deletion(-)
New commits:
commit ac05275755240dbd35f4ea802a8efb2fa4aaa85d
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Jan 12 16:29:54 2015 +0100
Fix alpha computation (-fsanitize=undefined)
Change-Id: I3f50d3bb85bebdece692e069de73febc2ce63b47
diff --git a/external/libebook/UnpackedTarball_libebook.mk b/external/libebook/UnpackedTarball_libebook.mk
index 7dfee2c..5c02bf4 100644
--- a/external/libebook/UnpackedTarball_libebook.mk
+++ b/external/libebook/UnpackedTarball_libebook.mk
@@ -11,6 +11,10 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,libebook))
$(eval $(call gb_UnpackedTarball_set_tarball,libebook,$(EBOOK_TARBALL)))
-$(eval $(call gb_UnpackedTarball_set_patchlevel,libebook,1))
+$(eval $(call gb_UnpackedTarball_set_patchlevel,libebook,0))
+
+$(eval $(call gb_UnpackedTarball_add_patches,libebook, \
+ external/libebook/ubsan.patch \
+))
# vim: set noet sw=4 ts=4:
diff --git a/external/libebook/ubsan.patch b/external/libebook/ubsan.patch
new file mode 100644
index 0000000..0a3ead2
--- /dev/null
+++ b/external/libebook/ubsan.patch
@@ -0,0 +1,11 @@
+--- src/lib/LRFCollector.cpp
++++ src/lib/LRFCollector.cpp
+@@ -50,7 +50,7 @@
+ {
+ assert(0 == bg.a);
+
+- const double a = fg.a;
++ const double a = fg.a / 255.0;
+
+ const double r = (1 - a) * bg.r + a * fg.r;
+ const double g = (1 - a) * bg.g + a * fg.g;
More information about the Libreoffice-commits
mailing list