diff options
author | zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2011-12-19 11:04:45 +0000 |
---|---|---|
committer | zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2011-12-19 11:04:45 +0000 |
commit | 1183e193897ab3e03c2cebec978a1a053fcb179d (patch) | |
tree | 7e2f24e08a6c8552114823bd85f33d3c9ae76e58 /pcre_dfa_exec.c | |
parent | a8cda0f054f0037a0a961b3e78ce0c5a00ebf63b (diff) | |
download | pcre-1183e193897ab3e03c2cebec978a1a053fcb179d.tar.gz |
fixing existing and adding new byte-order related functions
git-svn-id: svn://vcs.exim.org/pcre/code/branches/pcre16@809 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_dfa_exec.c')
-rw-r--r-- | pcre_dfa_exec.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/pcre_dfa_exec.c b/pcre_dfa_exec.c index a7d2037..6356e46 100644 --- a/pcre_dfa_exec.c +++ b/pcre_dfa_exec.c @@ -3019,9 +3019,7 @@ BOOL utf, anchored, startline, firstline; const pcre_uchar *current_subject, *end_subject; const pcre_uint8 *lcc; -pcre_study_data internal_study; const pcre_study_data *study = NULL; -real_pcre internal_re; const pcre_uchar *req_char_ptr; const pcre_uint8 *start_bits = NULL; @@ -3065,16 +3063,13 @@ if (extra_data != NULL) } /* Check that the first field in the block is the magic number. If it is not, -test for a regex that was compiled on a host of opposite endianness. If this is -the case, flipped values are put in internal_re and internal_study if there was -study data too. */ +return with PCRE_ERROR_BADMAGIC. However, if the magic number is equal to +REVERSED_MAGIC_NUMBER we return with PCRE_ERROR_BADENDIANNESS, which +means that the pattern is likely compiled with different endianness. */ if (re->magic_number != MAGIC_NUMBER) - { - re = PRIV(try_flipped)(re, &internal_re, study, &internal_study); - if (re == NULL) return PCRE_ERROR_BADMAGIC; - if (study != NULL) study = &internal_study; - } + return re->magic_number == REVERSED_MAGIC_NUMBER? + PCRE_ERROR_BADENDIANNESS:PCRE_ERROR_BADMAGIC; if ((re->flags & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE; /* Set some local values */ |