From: op Date: Wed, 21 Jun 2023 17:59:24 +0000 (+0000) Subject: clear errno before strtoull as it may already be set to ERANGE X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=bba303a85ba7a9ff23eb095c97fa676dd69f6b18;p=openbsd clear errno before strtoull as it may already be set to ERANGE noticed and ok millert@ --- diff --git a/usr.sbin/smtpd/lka_filter.c b/usr.sbin/smtpd/lka_filter.c index 18ac7c1a3f8..bb5e8f4d66c 100644 --- a/usr.sbin/smtpd/lka_filter.c +++ b/usr.sbin/smtpd/lka_filter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka_filter.c,v 1.71 2023/06/21 17:56:26 op Exp $ */ +/* $OpenBSD: lka_filter.c,v 1.72 2023/06/21 17:59:24 op Exp $ */ /* * Copyright (c) 2018 Gilles Chehade @@ -605,6 +605,8 @@ lka_filter_process_response(const char *name, const char *line) if ((ep = strchr(kind, '|')) == NULL) fatalx("Missing token: %s", line); qid = ep+1; + + errno = 0; reqid = strtoull(qid, &ep, 16); if (qid[0] == '\0' || *ep != '|') fatalx("Invalid reqid: %s", line);