diff options
-rw-r--r-- | src/fuzzer/mode_padding.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/fuzzer/mode_padding.cpp b/src/fuzzer/mode_padding.cpp index 985ea25e3..0819afb72 100644 --- a/src/fuzzer/mode_padding.cpp +++ b/src/fuzzer/mode_padding.cpp @@ -8,6 +8,8 @@ #include <botan/mode_pad.h> #include <botan/internal/tls_cbc.h> +namespace { + size_t ref_pkcs7_unpad(const uint8_t in[], size_t len) { if(len <= 2) @@ -58,7 +60,7 @@ size_t ref_oneandzero_unpad(const uint8_t in[], size_t len) size_t idx = len - 1; - while(idx >= 0) + for(;;) { if(in[idx] == 0) { @@ -124,6 +126,8 @@ uint16_t ref_tls_cbc_unpad(const uint8_t in[], size_t len) return padding_length + 1; } +} + void fuzz(const uint8_t in[], size_t len) { Botan::PKCS7_Padding pkcs7; |