summaryrefslogtreecommitdiff
path: root/devel/libsafec/patches/patch-src__safeclib__strcasestr_s.c
diff options
context:
space:
mode:
Diffstat (limited to 'devel/libsafec/patches/patch-src__safeclib__strcasestr_s.c')
-rw-r--r--devel/libsafec/patches/patch-src__safeclib__strcasestr_s.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/devel/libsafec/patches/patch-src__safeclib__strcasestr_s.c b/devel/libsafec/patches/patch-src__safeclib__strcasestr_s.c
new file mode 100644
index 00000000000..43a3ac9f68d
--- /dev/null
+++ b/devel/libsafec/patches/patch-src__safeclib__strcasestr_s.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-src__safeclib__strcasestr_s.c,v 1.1.1.1 2014/11/09 01:52:24 agc Exp $
+
+patch for ctype macro args - how was this "safe" in the first place?
+
+--- src/safeclib/strcasestr_s.c 2014/11/09 01:39:40 1.1
++++ src/safeclib/strcasestr_s.c 2014/11/09 01:40:08
+@@ -153,7 +153,7 @@
+ while (dest[i] && dlen) {
+
+ /* not a match, not a substring */
+- if (toupper(dest[i]) != toupper(src[i])) {
++ if (toupper((unsigned char)dest[i]) != toupper((unsigned char)src[i])) {
+ break;
+ }
+