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