diff options
author | Franziskus Kiefer <franziskuskiefer@gmail.com> | 2017-07-10 15:07:14 +0200 |
---|---|---|
committer | Franziskus Kiefer <franziskuskiefer@gmail.com> | 2017-07-10 15:07:14 +0200 |
commit | d0eb27b111f301dd88e8f0ffc58d288741676bff (patch) | |
tree | f39479776ff875120ca41131d2190511a472dad6 | |
parent | 4dc08f10403e4201676de1420414b6b8a1f01d18 (diff) | |
download | nss-hg-d0eb27b111f301dd88e8f0ffc58d288741676bff.tar.gz |
Bug 1322071 - don't pass multi-byte ints to isprint, r=ttaubert
Differential Revision: https://nss-review.dev.mozaws.net/D365
-rw-r--r-- | cmd/lib/secutil.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/lib/secutil.c b/cmd/lib/secutil.c index cb4752df9..25a58e10c 100644 --- a/cmd/lib/secutil.c +++ b/cmd/lib/secutil.c @@ -991,7 +991,7 @@ secu_PrintUniversalString(FILE *out, const SECItem *i, const char *m, int level) for (s = my.data, d = tmp.data; len > 0; len--) { PRUint32 bmpChar = (s[0] << 24) | (s[1] << 16) | (s[2] << 8) | s[3]; s += 4; - if (!isprint(bmpChar)) + if (!isprint(bmpChar & 0xFF)) goto loser; *d++ = (unsigned char)bmpChar; } |