diff options
author | Jack Lloyd <[email protected]> | 2016-11-09 13:11:27 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-11-09 13:11:27 -0500 |
commit | 35f3a9a210673a226be5cdab67e771b7a87b7c68 (patch) | |
tree | e937ede8bf7f530da4f4d88b00a712fac58c30fd | |
parent | 404772705246247499219cf226c31449eb3a0cce (diff) |
Assert expected EOF from read
Found by Coverity.
-rw-r--r-- | src/lib/asn1/asn1_obj.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/asn1/asn1_obj.cpp b/src/lib/asn1/asn1_obj.cpp index e258cd809..7bf2d92ca 100644 --- a/src/lib/asn1/asn1_obj.cpp +++ b/src/lib/asn1/asn1_obj.cpp @@ -57,7 +57,7 @@ bool maybe_BER(DataSource& source) byte first_byte; if(!source.peek_byte(first_byte)) { - source.read_byte(first_byte); // force EOF + BOTAN_ASSERT_EQUAL(source.read_byte(first_byte), 0, "Expected EOF"); throw Stream_IO_Error("ASN1::maybe_BER: Source was empty"); } |