From 6a5b916d29ea472dde52e7590d2678b6a597f6b4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E8=AB=8F=E8=A8=AA=E5=AD=90?= Date: Wed, 22 May 2024 10:26:42 +0900 Subject: [PATCH] =?utf8?q?=E3=83=91=E3=82=B9=E3=83=AF=E3=83=BC=E3=83=89?= =?utf8?q?=E4=BD=9C=E6=88=90=E9=96=A2=E6=95=B0=E3=81=AE=E3=83=87=E3=83=95?= =?utf8?q?=E3=82=A9=E3=83=AB=E3=83=88=E3=81=AA=E9=95=B7=E3=81=95=E3=81=AF6?= =?utf8?q?4=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 ++- main.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60f89a7..0be6efb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,8 @@ * 最新ルールに従い * NetBSD向けのリリースコマンドの追加 * OpenBSD 7.5でTOTPの修正 (ヌル終端文字列のバグ) -* ヘルプの表示の削除 +* ヘルプの表示の削除 (manpageをご利用下さい) +* パスワード作成関数のデフォルトな長さは64に # 1.2.0 * やっとTOTP機能性を修正した diff --git a/main.c b/main.c index 44d5d08..5d61ba6 100644 --- a/main.c +++ b/main.c @@ -61,12 +61,13 @@ int main(int argc, char *argv[]) { } if (strcmp(argv[1], "-g") == 0) { - if (argc != 3 && argc != 4) { + if (argc > 4) { usage(); return 1; } - if (argc == 3) genpass(atoi(argv[2]), true); + if (argc == 2) genpass(64, true); + else if (argc == 3) genpass(atoi(argv[2]), true); else if (argc == 4 && strcmp(argv[3], "risk") == 0) genpass(atoi(argv[2]), false); else if (argc == 4 && strcmp(argv[3], "secure") == 0) -- 2.43.0