diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2016-10-14 13:50:57 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2016-10-19 16:34:11 +0200 |
commit | c0ffb01dd42b21023c00cb57f8d22bc5b53e244b (patch) | |
tree | 78ae0295f2966a4688c3563db753f7a54ee81430 | |
parent | e235664cdac283d2dd08059f09cc0ac141146fe8 (diff) | |
download | libnitrokey-c0ffb01dd42b21023c00cb57f8d22bc5b53e244b.tar.gz libnitrokey-c0ffb01dd42b21023c00cb57f8d22bc5b53e244b.tar.bz2 |
Log strcpyT argument sizes info
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r-- | NitrokeyManager.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc index 78b5d84..20657a5 100644 --- a/NitrokeyManager.cc +++ b/NitrokeyManager.cc @@ -8,10 +8,15 @@ namespace nitrokey{ template <typename T> void strcpyT(T& dest, const char* src){ - if (src == nullptr) + + if (src == nullptr) // throw EmptySourceStringException(slot_number); return; const size_t s_dest = sizeof dest; + nitrokey::log::Log::instance()(std::string("strcpyT sizes ") + +std::to_string(s_dest)+ " " + +std::to_string(strlen(src))+ " " + ,nitrokey::log::Loglevel::DEBUG); if (strlen(src) > s_dest){ throw TooLongStringException(strlen(src), s_dest, src); } |