aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNever <[email protected]>2016-12-09 14:32:56 +0100
committerNever <[email protected]>2016-12-09 14:32:56 +0100
commit672ca8bfff4075a5feb5cfe4313d7ad2c6c1fe4a (patch)
tree0830d2dc48f1ed14925971b9c1425ff1ce5d1085
parent2e37f7601380a09ac635941581387d4ac6b54f12 (diff)
forgot to unpoison return vals
-rw-r--r--src/lib/modes/mode_pad/mode_pad.cpp4
1 files changed, 4 insertions, 0 deletions
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;
}