From 0bf54b1ecaec8f6d80845d6cb77d62f8c9f4c415 Mon Sep 17 00:00:00 2001 From: Yves Orton Date: Fri, 10 Jun 2016 13:34:37 +0200 Subject: [PATCH] fixup, guard av_top_index() for null RExC_warn_text --- regcomp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/regcomp.c b/regcomp.c index a62e0b7..86173db 100644 --- a/regcomp.c +++ b/regcomp.c @@ -14534,8 +14534,7 @@ S_handle_possible_posix(pTHX_ RExC_state_t *pRExC_state, ADD_POSIX_WARNING(p, "there is no terminating ']'"); } - if (posix_warnings && av_top_index(RExC_warn_text) > -1) { - /* warn_text should only be true if posix_warnings is true */ + if (posix_warnings && RExC_warn_text && av_top_index(RExC_warn_text) > -1) { *posix_warnings = RExC_warn_text; } } -- 1.8.3.1