Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 1581024 - Check for pointer wrap in derprint.c. r=jcj
Check for pointer wrap on output-length check in the derdump utility.

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

--HG--
extra : moz-landing-system : lando
  • Loading branch information
Kevin Jacobs committed Sep 18, 2019
1 parent 2cf7fd1 commit 7192bf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/lib/derprint.c
Expand Up @@ -509,7 +509,7 @@ 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) > end) {
if ((data + slen) < data || (data + slen) > end) {
PORT_SetError(SEC_ERROR_BAD_DER);
return -1;
}
Expand Down

0 comments on commit 7192bf2

Please sign in to comment.