From bef6cffeeddf97df6c67047a0c4bf50bbaef17fe Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Tue, 22 Oct 2024 08:58:36 +0300 Subject: [PATCH] Bugfix * wordsplit.c (wordsplit_pathexpand): Fix use after free. --- .gitignore | 4 ++++ wordsplit.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3a296c7..70fe0f5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ *~ .emacs* +*.o +.deps/ +.dirstamp +module.spec diff --git a/wordsplit.c b/wordsplit.c index 9139e85..ea502df 100644 --- a/wordsplit.c +++ b/wordsplit.c @@ -2149,7 +2149,7 @@ wordsplit_pathexpand (struct wordsplit *wsp) default: free (pattern); - return _wsplt_setctxerr (wsp, WRDSE_GLOBERR, pattern, slen); + return _wsplt_setctxerr (wsp, WRDSE_GLOBERR, str, slen); } prev = p;