PadderIso7816: Do not allow to pad empty ranges.
This commit is contained in:
1 parent
4e5627b503
commit
5966c32121
2 files changed
+21
-17
No files matched your search
@@ -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