diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-05-05 14:01:59 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-05-05 14:01:59 +0200 |
commit | 9989c26bc99c90d3047a7b3e20e0800b62f62300 (patch) | |
tree | 0a2b04288168bf08530568c94c326f2e9a98a397 /pcre/pcreposix.c | |
parent | 39d248fa555350756a569d766f11eec4c65c5b16 (diff) | |
parent | 3c07ed141c2ed885dea13fbce8603afce6250590 (diff) | |
download | mariadb-git-9989c26bc99c90d3047a7b3e20e0800b62f62300.tar.gz |
Merge branch '10.0' into 10.1
Diffstat (limited to 'pcre/pcreposix.c')
-rw-r--r-- | pcre/pcreposix.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pcre/pcreposix.c b/pcre/pcreposix.c index 7b404a71100..a76d6bfca45 100644 --- a/pcre/pcreposix.c +++ b/pcre/pcreposix.c @@ -6,7 +6,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel - Copyright (c) 1997-2017 University of Cambridge + Copyright (c) 1997-2018 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -389,8 +389,8 @@ if (rc >= 0) { for (i = 0; i < (size_t)rc; i++) { - pmatch[i].rm_so = ovector[i*2] + so; - pmatch[i].rm_eo = ovector[i*2+1] + so; + pmatch[i].rm_so = (ovector[i*2] < 0)? -1 : ovector[i*2] + so; + pmatch[i].rm_eo = (ovector[i*2+1] < 0)? -1: ovector[i*2+1] + so; } if (allocated_ovector) free(ovector); for (; i < nmatch; i++) pmatch[i].rm_so = pmatch[i].rm_eo = -1; |