summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Sorokin <v.sorokin@confident.spb.ru>2013-09-12 12:50:07 +0200
committerVladimir Sorokin <v.sorokin@confident.spb.ru>2013-09-12 12:50:07 +0200
commit1f81b35cdbdc9a78a87d42852aa8cd5d38849463 (patch)
tree47e0e2404d711ccd72832ce24100d2f6fa9467a0
parent9e71083a05ed9e9192822cc6e6184d0d585d029e (diff)
downloadlibpwquality-1f81b35cdbdc9a78a87d42852aa8cd5d38849463.tar.gz
Terminate the name properly.
-rw-r--r--src/settings.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/settings.c b/src/settings.c
index a16a204..1f73395 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -204,7 +204,7 @@ pwquality_set_option(pwquality_settings_t *pwq, const char *option)
return PWQ_ERROR_UNKNOWN_SETTING;
strncpy(name, option, len);
- name[sizeof(name) - 1] = '\0';
+ name[len] = '\0';
return set_name_value(pwq, name, value);
}