From 672ca8bfff4075a5feb5cfe4313d7ad2c6c1fe4a Mon Sep 17 00:00:00 2001 From: Never Date: Fri, 9 Dec 2016 14:32:56 +0100 Subject: forgot to unpoison return vals --- src/lib/modes/mode_pad/mode_pad.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/lib') diff --git a/src/lib/modes/mode_pad/mode_pad.cpp b/src/lib/modes/mode_pad/mode_pad.cpp index 893795089..c84c2030e 100644 --- a/src/lib/modes/mode_pad/mode_pad.cpp +++ b/src/lib/modes/mode_pad/mode_pad.cpp @@ -69,6 +69,7 @@ size_t PKCS7_Padding::unpad(const byte block[], size_t size) const CT::conditional_copy_mem(bad_input,&pad_pos,&size,&pad_pos,1); CT::unpoison(block,size); + CT::unpoison(pad_pos); return pad_pos; } @@ -108,6 +109,7 @@ size_t ANSI_X923_Padding::unpad(const byte block[], size_t size) const } CT::conditional_copy_mem(bad_input,&pad_pos,&size,&pad_pos,1); CT::unpoison(block,size); + CT::unpoison(pad_pos); return pad_pos; } @@ -146,6 +148,7 @@ size_t OneAndZeros_Padding::unpad(const byte block[], size_t size) const CT::conditional_copy_mem(size_t(bad_input),&pad_pos,&size,&pad_pos,1); CT::unpoison(block, size); + CT::unpoison(pad_pos); return pad_pos; } @@ -185,6 +188,7 @@ size_t ESP_Padding::unpad(const byte block[], size_t size) const } CT::conditional_copy_mem(bad_input,&pad_pos,&size,&pad_pos,1); CT::unpoison(block, size); + CT::unpoison(pad_pos); return pad_pos; } -- cgit v1.2.3