Date: Thu, 7 Sep 2023 20:28:49 GMT From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= <des@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: b27e66f26643 - stable/14 - libipf: fix parser error message. Message-ID: <202309072028.387KSn5Z064731@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b27e66f2664359de22ff752faf7a81b6530fd009 commit b27e66f2664359de22ff752faf7a81b6530fd009 Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2023-08-31 20:15:54 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2023-09-07 20:28:31 +0000 libipf: fix parser error message. MFC after: 1 week Reviewed by: cy Differential Revision: https://reviews.freebsd.org/D41652 (cherry picked from commit 4cd9d804ae8b955d47dfa0bba06e7c254d760cb1) Approved by: re (gjb) --- sbin/ipf/libipf/parseipfexpr.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sbin/ipf/libipf/parseipfexpr.c b/sbin/ipf/libipf/parseipfexpr.c index 215e43b2978d..880258e5dd66 100644 --- a/sbin/ipf/libipf/parseipfexpr.c +++ b/sbin/ipf/libipf/parseipfexpr.c @@ -93,11 +93,7 @@ parseipfexpr(char *line, char **errorptr) break; } if (e->ipoe_word == NULL) { - error = malloc(32); - if (error != NULL) { - snprintf(error, sizeof(error), "keyword (%.10s) not found", - ops); - } + asprintf(&error, "keyword (%.10s) not found", ops); goto parseerror; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202309072028.387KSn5Z064731>