X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=abook.c;h=1651267a541ef44bc5352786ca121777ce298fd3;hb=a2d4ea58437d93297c7f7e2e8efd4d48297ca46a;hp=05ec4293d37290d4644ddd22b74782528864d93a;hpb=db05da322d7ef6bd94e097fb95af1ffead328b96;p=pkg%2Fabook.git diff --git a/abook.c b/abook.c index 05ec429..1651267 100644 --- a/abook.c +++ b/abook.c @@ -390,8 +390,8 @@ parse_command_line(int argc, char **argv) selected_item_filter = select_output_item_filter(outformat); break; case OPT_OUTFORMAT_STR: - strncpy(custom_format, optarg, FORMAT_STRING_LEN - 1); - custom_format[FORMAT_STRING_LEN] = 0; + strncpy(custom_format, optarg, FORMAT_STRING_LEN); + custom_format[FORMAT_STRING_LEN - 1] = 0; break; case OPT_INFILE: set_convert_var(infile);