From 0e542c8dba1f547d162102e0b719b2a59e40a791 Mon Sep 17 00:00:00 2001 From: Oleksij Rempel Date: Mon, 24 Jun 2019 12:55:51 +0200 Subject: [PATCH] jcat: make sure we can use decimal numbers for repeat parameter Signed-off-by: Oleksij Rempel --- jcat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jcat.c b/jcat.c index cbbc62a..1624f1b 100644 --- a/jcat.c +++ b/jcat.c @@ -48,7 +48,7 @@ struct jcat_priv { int infile; int outfile; size_t max_transfer; - int repeat; + unsigned long repeat; int todo_prio; bool valid_peername; @@ -605,7 +605,7 @@ static int jcat_parse_args(struct jcat_priv *priv, int argc, char *argv[]) priv->todo_connect = 1; break; case 'R': - priv->repeat = atoi(optarg); + priv->repeat = strtoul(optarg, NULL, 0); if (priv->repeat < 1) err(EXIT_FAILURE, "send/repeat count can't be less then 1\n"); break;