PadderIso7816: Do not allow to pad empty ranges.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "Padding/Padder.hpp"
|
||||
#include "Service/Branchless.hpp"
|
||||
#include "Service/ChaosException.hpp"
|
||||
|
||||
namespace Chaos::Padding
|
||||
{
|
||||
@@ -28,6 +29,10 @@ public:
|
||||
*it = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw Service::ChaosException("PadderIso7816::Pad(): invalid range");
|
||||
}
|
||||
}
|
||||
|
||||
struct ComputeUnpadResult
|
||||
|
||||
Reference in New Issue
Block a user