aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2018-04-19 15:01:18 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2018-04-19 15:01:18 +0200
commit9ab13fd0ae3d85dcb9a3fcef0594aacb1946086b (patch)
tree201f025951868128fc64c0253589546ca0dea53f
parentd2db195bbe73044681cd6b1ca242de23c57ea917 (diff)
downloadlibnitrokey-9ab13fd0ae3d85dcb9a3fcef0594aacb1946086b.tar.gz
libnitrokey-9ab13fd0ae3d85dcb9a3fcef0594aacb1946086b.tar.bz2
Correct NK_status() reply length
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r--NK_C_API.cc2
1 files changed, 1 insertions, 1 deletions
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;
});