Created
September 1, 2018 18:49
-
-
Save guidovranken/3ca4ce4c56f0b50d7b6e0094a6a2c1a6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/contrib/bsnmp/lib/asn1.c b/contrib/bsnmp/lib/asn1.c | |
| index 03b5662..57f9380 100644 | |
| --- a/contrib/bsnmp/lib/asn1.c | |
| +++ b/contrib/bsnmp/lib/asn1.c | |
| @@ -100,6 +100,11 @@ asn_get_header(struct asn_buf *b, u_char *type, asn_len_t *len) | |
| *len = *b->asn_cptr++; | |
| b->asn_len--; | |
| } | |
| + | |
| + if ( *len > b->asn_len ) { | |
| + return (ASN_ERR_EOBUF); | |
| + } | |
| + | |
| return (ASN_ERR_OK); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment