summaryrefslogtreecommitdiff
path: root/Build/source/utils/xpdfopen/TLpatches/patch-01-unsigned
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/xpdfopen/TLpatches/patch-01-unsigned')
-rw-r--r--Build/source/utils/xpdfopen/TLpatches/patch-01-unsigned14
1 files changed, 14 insertions, 0 deletions
diff --git a/Build/source/utils/xpdfopen/TLpatches/patch-01-unsigned b/Build/source/utils/xpdfopen/TLpatches/patch-01-unsigned
new file mode 100644
index 00000000000..7e4a4ceaa12
--- /dev/null
+++ b/Build/source/utils/xpdfopen/TLpatches/patch-01-unsigned
@@ -0,0 +1,14 @@
+ Avoid undefined behavior when char is signed.
+
+diff -ur xpdfopen-0.86.orig/sendx.c xpdfopen-0.86/sendx.c
+--- xpdfopen-0.86.orig/sendx.c 2012-01-28 01:39:39.000000000 +0100
++++ xpdfopen-0.86/sendx.c 2014-06-18 08:13:50.000000000 +0200
+@@ -229,7 +229,7 @@
+ */
+ if (ks < 256)
+ {
+- event.state = isupper((char)ks);
++ event.state = isupper((unsigned char)ks);
+ switch (ks)
+ {
+ case 0x08: