1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-09-21 19:31:50 +02:00

52252: Coverity defect 1547827

This commit is contained in:
Oliver Kiddle 2023-11-01 00:34:29 +01:00
parent 8ebbf25a71
commit 9f57ca4ac8
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,7 @@
2023-11-01 Oliver Kiddle <opk@zsh.org>
* 52252: Src/Modules/pcre.c: Coverity defect 1547827
* Shohei YOSHIDA: 52179: Completion/Unix/Command/_gradle:
Fix gradlew completion when it isn't in PATH

View File

@ -187,7 +187,8 @@ zpcre_get_substrings(pcre2_code *pat, char *arg, pcre2_match_data *mdata,
setaparam(substravar, matches);
}
if (!pcre2_pattern_info(pat, PCRE2_INFO_NAMECOUNT, &ncount) && ncount
if (namedassoc
&& !pcre2_pattern_info(pat, PCRE2_INFO_NAMECOUNT, &ncount) && ncount
&& !pcre2_pattern_info(pat, PCRE2_INFO_NAMEENTRYSIZE, &nsize)
&& !pcre2_pattern_info(pat, PCRE2_INFO_NAMETABLE, &ntable))
{