diff options
| author | Anatol Belski <ab@php.net> | 2019-05-25 11:33:39 +0200 |
|---|---|---|
| committer | Anatol Belski <ab@php.net> | 2019-05-25 11:37:30 +0200 |
| commit | aa9433e9286801a6af6d4cee73d9a165a61e0e3b (patch) | |
| tree | 37146b86fc993ed202e033bc3b8e6bb72ca0177e /ext/pcre/pcre2lib/pcre2_printint.c | |
| parent | ef34e00df34f88c852baac84ad1428d4360c6d06 (diff) | |
| download | php-git-aa9433e9286801a6af6d4cee73d9a165a61e0e3b.tar.gz | |
Upgrade bundled PCRE2 to 10.33
Diffstat (limited to 'ext/pcre/pcre2lib/pcre2_printint.c')
| -rw-r--r-- | ext/pcre/pcre2lib/pcre2_printint.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/pcre/pcre2lib/pcre2_printint.c b/ext/pcre/pcre2lib/pcre2_printint.c index bd10c6b1da..b132d44f8c 100644 --- a/ext/pcre/pcre2lib/pcre2_printint.c +++ b/ext/pcre/pcre2lib/pcre2_printint.c @@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Original API code Copyright (c) 1997-2012 University of Cambridge - New API code Copyright (c) 2016-2018 University of Cambridge + New API code Copyright (c) 2016-2019 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -393,6 +393,7 @@ for(;;) case OP_ASSERTBACK: case OP_ASSERTBACK_NOT: case OP_ONCE: + case OP_SCRIPT_RUN: case OP_COND: case OP_SCOND: case OP_REVERSE: @@ -672,17 +673,18 @@ for(;;) map = (uint8_t *)ccode; if (invertmap) { - for (i = 0; i < 32; i++) inverted_map[i] = ~map[i]; + /* Using 255 ^ instead of ~ avoids clang sanitize warning. */ + for (i = 0; i < 32; i++) inverted_map[i] = 255 ^ map[i]; map = inverted_map; } for (i = 0; i < 256; i++) { - if ((map[i/8] & (1 << (i&7))) != 0) + if ((map[i/8] & (1u << (i&7))) != 0) { int j; for (j = i+1; j < 256; j++) - if ((map[j/8] & (1 << (j&7))) == 0) break; + if ((map[j/8] & (1u << (j&7))) == 0) break; if (i == '-' || i == ']') fprintf(f, "\\"); if (PRINTABLE(i)) fprintf(f, "%c", i); else fprintf(f, "\\x%02x", i); |
