From 9ab13fd0ae3d85dcb9a3fcef0594aacb1946086b Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Thu, 19 Apr 2018 15:01:18 +0200 Subject: Correct NK_status() reply length Signed-off-by: Szczepan Zalega --- NK_C_API.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NK_C_API.cc b/NK_C_API.cc index ec9bfa5..8e005b8 100644 --- a/NK_C_API.cc +++ b/NK_C_API.cc @@ -247,7 +247,7 @@ extern "C" { auto m = NitrokeyManager::instance(); return get_with_string_result([&]() { string && s = m->get_status_as_string(); - char * rs = strndup(s.c_str(), max_string_field_length); + char * rs = strndup(s.c_str(), MAXIMUM_STR_REPLY_LENGTH); clear_string(s); return rs; }); -- cgit v1.2.3