pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bip: fix unsafe patch
Module Name: pkgsrc-wip
Committed By: Petar Bogdanovic <petar%smokva.net@localhost>
Pushed By: petar
Date: Sat Oct 17 23:03:52 2015 +0200
Changeset: 054e7d7ce2d9ca70365c5ff109cf545f273853bc
Modified Files:
bip/distinfo
bip/patches/patch-src_util.c
Log Message:
bip: fix unsafe patch
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=054e7d7ce2d9ca70365c5ff109cf545f273853bc
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
bip/distinfo | 2 +-
bip/patches/patch-src_util.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diffs:
diff --git a/bip/distinfo b/bip/distinfo
index 43cf04b..2c7e817 100644
--- a/bip/distinfo
+++ b/bip/distinfo
@@ -4,4 +4,4 @@ SHA1 (bip-0.8.9.tar.gz) = 6c6828dde0ec9c41237bac42a679aa8237bdeffe
RMD160 (bip-0.8.9.tar.gz) = 709f56d6b09cbd28f64e8614a899bfdd3e18fad2
Size (bip-0.8.9.tar.gz) = 256711 bytes
SHA1 (patch-Makefile.in) = 1ae208c3f19b6519636d6c63a7fff576b1e06143
-SHA1 (patch-src_util.c) = 7d0d2516cb21e0b2b8fed76e1e78b0d16aac0c3f
+SHA1 (patch-src_util.c) = 92571ea470d3af9a4bc08829f3259e7580839ae0
diff --git a/bip/patches/patch-src_util.c b/bip/patches/patch-src_util.c
index 4b0b738..17df9b5 100644
--- a/bip/patches/patch-src_util.c
+++ b/bip/patches/patch-src_util.c
@@ -9,12 +9,12 @@ Fix ctype(3) usage.
{
char *tmp;
- if (!str || !isalpha(*str))
-+ if (!str || !isalpha(*(int*)str))
++ if (!str || !isalpha((unsigned char)*str))
return 0;
tmp = str;
- while (*tmp != '\0' && (isalnum(*tmp) || *tmp == '-' || *tmp == '[' ||
-+ while (*tmp != '\0' && (isalnum(*(int*)tmp) || *tmp == '-' || *tmp == '[' ||
++ while (*tmp != '\0' && (isalnum((unsigned char)*tmp) || *tmp == '-' || *tmp == '[' ||
*tmp == ']' || *tmp == '\\' || *tmp == '`' ||
*tmp == '^' || *tmp == '{' || *tmp == '}' ||
*tmp == '|' || *tmp == '_' ))
@@ -23,7 +23,7 @@ Fix ctype(3) usage.
while ((c = *pkey++))
- hash = ((hash << 5) + hash) ^ toupper(c);
-+ hash = ((hash << 5) + hash) ^ toupper((int)c);
++ hash = ((hash << 5) + hash) ^ toupper((unsigned char)c);
return (unsigned char)hash;
}
@@ -32,7 +32,7 @@ Fix ctype(3) usage.
{
while (*s) {
- *s = toupper(*s);
-+ *s = toupper(*(int*)s);
++ *s = toupper((unsigned char)*s);
s++;
}
}
Home |
Main Index |
Thread Index |
Old Index