This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add more checking for regnode offset overflowing
[perl5.git] / embed.fnc
index 2f8dd63..c1236e1 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -1742,7 +1742,7 @@ EMpX      |SV*    |invlist_clone  |NN SV* const invlist|NULLOK SV* newlist
 #endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_TOKE_C) || defined(PERL_IN_UTF8_C) || defined(PERL_IN_PP_C)
 EiMRn  |UV*    |invlist_array  |NN SV* const invlist
-EiMRn  |bool   |is_invlist     |NN SV* const invlist
+EiMRn  |bool   |is_invlist     |NULLOK SV* const invlist
 EiMRn  |bool*  |get_invlist_offset_addr|NN SV* invlist
 EiMRn  |UV     |_invlist_len   |NN SV* const invlist
 EMiRn  |bool   |_invlist_contains_cp|NN SV* const invlist|const UV cp
@@ -2424,7 +2424,7 @@ Es        |void   |reginsert      |NN RExC_state_t *pRExC_state \
                                |const U8 op                                \
                                |const regnode_offset operand               \
                                |const U32 depth
-Es     |void   |regtail        |NN RExC_state_t * pRExC_state              \
+Es     |bool   |regtail        |NN RExC_state_t * pRExC_state              \
                                |NN const regnode_offset p                  \
                                |NN const regnode_offset val                \
                                |const U32 depth
@@ -2556,7 +2556,7 @@ Es        |void   |dump_trie_interim_list|NN const struct _reg_trie_data *trie\
 Es     |void   |dump_trie_interim_table|NN const struct _reg_trie_data *trie\
                                |NULLOK HV* widecharmap|NN AV *revcharmap\
                                |U32 next_alloc|U32 depth
-Es     |U8     |regtail_study  |NN RExC_state_t *pRExC_state \
+Es     |bool   |regtail_study  |NN RExC_state_t *pRExC_state \
                                |NN regnode_offset p|NN const regnode_offset val|U32 depth
 #  endif
 #endif
@@ -2736,6 +2736,10 @@ s        |void   |anonymise_cv_maybe     |NN GV *gv|NN CV *cv
 : Used in sv.c and hv.c
 po     |void * |more_bodies    |const svtype sv_type|const size_t body_size \
                                |const size_t arena_size
+EXpR   |SV*    |get_and_check_backslash_N_name|NN const char* s        \
+                               |NN const char* const e                 \
+                               |const bool is_utf8                     \
+                               |NN const char** error_msg
 
 #if defined(PERL_IN_TOKE_C)
 s      |void   |check_uni
@@ -2746,7 +2750,7 @@ s |char*  |force_word     |NN char *start|int token|int check_keyword \
                                |int allow_pack
 s      |SV*    |tokeq          |NN SV *sv
 sR     |char*  |scan_const     |NN char *start
-sR     |SV*    |get_and_check_backslash_N_name|NN const char* s \
+sR     |SV*    |get_and_check_backslash_N_name_wrapper|NN const char* s \
                                |NN const char* const e
 sR     |char*  |scan_formline  |NN char *s
 sR     |char*  |scan_heredoc   |NN char *s
@@ -2786,10 +2790,11 @@ sR      |I32    |sublex_start
 sR     |char * |filter_gets    |NN SV *sv|STRLEN append
 sR     |HV *   |find_in_my_stash|NN const char *pkgname|STRLEN len
 sR     |char * |tokenize_use   |int is_use|NN char *s
-so     |SV*    |new_constant   |NULLOK const char *s|STRLEN len \
+so     |SV*    |new_constant   |NULLOK const char *s|STRLEN len            \
                                |NN const char *key|STRLEN keylen|NN SV *sv \
-                               |NULLOK SV *pv|NULLOK const char *type \
-                               |STRLEN typelen
+                               |NULLOK SV *pv|NULLOK const char *type      \
+                               |STRLEN typelen                             \
+                               |NULLOK const char ** error_msg
 s      |int    |ao             |int toketype
 s      |void|parse_ident|NN char **s|NN char **d \
                      |NN char * const e|int allow_package \