Skip to content

Commit

Permalink
Bug 1322071 - don't pass multi-byte ints to isprint, r=ttaubert
Browse files Browse the repository at this point in the history
Differential Revision: https://nss-review.dev.mozaws.net/D365

--HG--
extra : rebase_source : af61099062fffa45477fe33d915e2df1d66073ab
  • Loading branch information
franziskuskiefer committed Jul 10, 2017
1 parent cd651a8 commit 33e8bf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/lib/secutil.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 33e8bf4

Please sign in to comment.