diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-12-08 23:49:51 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-12-08 23:49:51 +0000 |
commit | 3566a07d0a1971a157d7d35ea17ca7d26f785868 (patch) | |
tree | a52942e6b95a463f0f64b322c454ec4e8255a063 /util.c | |
parent | 85efc3a51ca0ee5724a80b554624140f51d5305c (diff) | |
download | perl-3566a07d0a1971a157d7d35ea17ca7d26f785868.tar.gz |
In Perl_fbm_instr(), no need to calculate the address of the table if
we're going to return anyway.
p4raw-id: //depot/perl@29492
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -680,12 +680,14 @@ Perl_fbm_instr(pTHX_ unsigned char *big, register unsigned char *bigend, SV *lit return b; } - { /* Do actual FBM. */ + /* Do actual FBM. */ + if (littlelen > (STRLEN)(bigend - big)) + return NULL; + + { register const unsigned char * const table = little + littlelen + FBM_TABLE_OFFSET; register const unsigned char *oldlittle; - if (littlelen > (STRLEN)(bigend - big)) - return NULL; --littlelen; /* Last char found by table lookup */ s = big + littlelen; |