From c0ffb01dd42b21023c00cb57f8d22bc5b53e244b Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Fri, 14 Oct 2016 13:50:57 +0200 Subject: Log strcpyT argument sizes info Signed-off-by: Szczepan Zalega --- NitrokeyManager.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 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); } -- cgit v1.2.3