Skip to content

Commit

Permalink
Bug 1581024 - fixup pointer wrap check to prevent it from being optim…
Browse files Browse the repository at this point in the history
…ized out. r=jcj

Differential Revision: https://phabricator.services.mozilla.com/D47013

--HG--
extra : moz-landing-system : lando
  • Loading branch information
Kevin Jacobs committed Sep 24, 2019
1 parent c0c6d54 commit 295dcb1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/lib/derprint.c
Expand Up @@ -509,7 +509,8 @@ prettyPrintItem(FILE *out, const unsigned char *data, const unsigned char *end,
/*
* Just quit now if slen more bytes puts us off the end.
*/
if ((data + slen) < data || (data + slen) > end) {
if (((unsigned long)data + slen) < (unsigned long)data ||
((unsigned long)data + slen) > (unsigned long)end) {
PORT_SetError(SEC_ERROR_BAD_DER);
return -1;
}
Expand Down

0 comments on commit 295dcb1

Please sign in to comment.