Commit Graph

7116 Commits

Author SHA1 Message Date
rin bd6bbecf8a Fix use of uninitialized variable, found by clang. 2017-11-21 02:00:29 +00:00
rin bc436ad3c5 Fix an apparent typo. 2017-11-19 21:54:31 +00:00
rin 98796d9c59 Add missing integer overflow checks to avoid out-of-bound write reported in
CVE-2016-8859, partially taken from musl libc:
https://git.musl-libc.org/cgit/musl/commit/src/regex/regexec.c?id=c3edc06d1e1360f3570db9155d6b318ae0d0f0f7
https://git.musl-libc.org/cgit/musl/commit/src/regex/regexec.c?id=6582baa752a8facb2c8a7b5b3dcf67331429cdc1
2017-11-19 14:03:35 +00:00
rin 27d137ae33 Fix memory leak when input contains illegal multibyte sequence, partially
taken from musl libc:
https://git.musl-libc.org/cgit/musl/commit/src/regex/regexec.c?id=546f6b322bcafa2452925c19f9607d9689c75f95
2017-11-19 13:22:58 +00:00
rin 99fb528edf ret should be reg_errcode_t. 2017-11-19 13:21:02 +00:00
rin 42ec3f9a8a nmatch and pmatch should be ignored when regex was compiled with REG_NOSUB,
partially taken from musl libc:
https://git.musl-libc.org/cgit/musl/commit/src/regex/regexec.c?id=72ed3d47e567b1635a35d3c1d174c8a8b2787e30
2017-11-19 13:00:31 +00:00
rin b259d3eb4b Fix use of uninitialized value, taken from musl libc:
https://git.musl-libc.org/cgit/musl/commit/src/regex/regcomp.c?id=51eeb6ebc94d965768143c45e9f39b0a7998bdbd
2017-11-19 12:35:39 +00:00
rin 3e69e8b8e0 Check error code from allocating function, from musl libc:
https://git.musl-libc.org/cgit/musl/commit/src/regex/regcomp.c?id=4260dfe1ecc43d92d1e6d30daa0f22bd746d1740
2017-11-19 12:26:25 +00:00
rin f6cec12c68 Fix allocation size with wrong use of sizeof, taken from musl libc:
https://git.musl-libc.org/cgit/musl/commit/src/regex/regcomp.c?id=1e81fa4524ecfd51e6a6578ff8038b4c05393101
2017-11-19 12:13:14 +00:00
kre 4464b377cc Let's define symbols before using them. 2017-11-18 18:52:59 +00:00
christos 3be9d673a3 use symbolic constant for 0 2017-11-18 13:51:56 +00:00
christos 114ddb80d3 our pool code needs either PR_SLEEP or PR_NOWAIT; arrange for that explaining
the current choice :-)
2017-11-17 18:18:01 +00:00
rin b62effec65 Add ChangeLog.old, which has been newly added to github repository. 2017-11-17 16:44:01 +00:00
rin 27e1684d1f Add tre.pc to be installed into /usr/lib/pkgconfig (not yet). 2017-11-17 16:18:06 +00:00
rin 8da3505fc4 Regen. Actually stop using alloca(3). 2017-11-17 16:17:06 +00:00
rin d8dd61809f Disable tre_reg*b() when we don't have REG_USEBYTES. 2017-11-17 16:16:19 +00:00
rin 13498f309b Merge tre as of 20171117. 2017-11-17 16:14:30 +00:00
rin 1580a27b92 Import tre from https://github.com/laurikari/tre as of 10171117:
- tre_reg*b() functions are added, that take bytes literally.
- minor bug fixes
2017-11-17 16:11:11 +00:00
rin 83236858b0 Add tre2netbsd script based on nvi2netbsd. 2017-11-17 16:08:20 +00:00
rin 27e310595e Specify TRE_REGEX_T_FIELD in CPPFLAGS when we want ABI compatible with libc,
in a similar manner to TRE_SYSTEM_REGEX_H_PATH and TRE_USE_SYSTEM_REGEX_H.

No binary changes.
2017-11-17 14:37:37 +00:00
skrll 3f391d52fc Match hppa JEMALLOC_TINY_MIN_2POW 2017-11-16 13:54:42 +00:00
mrg 9d6d176649 merge mknative files from gcc.old back into gcc.
they're back to being the same again now.
2017-11-15 23:33:49 +00:00
mrg 0ace67202c ensure version.c gets rebuilt properly. 2017-11-15 07:47:10 +00:00
rin 3a5fc74837 Fix cursor movement for the case of USE_WIDECHAR != "yes", where the argument
of INTISWIDE() is not evaluated.
2017-11-14 12:20:55 +00:00
mrg c91d24e196 sync with gcc.old. 2017-11-14 09:04:16 +00:00
mrg 9f4f6abc0f attempt to fix liblto_plugin build. on sparc it at least now
appears to have no missing symbols.  add xasprintf.c, xvasprintf.c,
and vprintf-support.c.

fix vprintf-support.c to include vprintf-support.h.
2017-11-14 08:52:20 +00:00
mrg 8cf273c725 from gcc.old:
>it's ${BUILDINCS} not {BUILDINCS}
2017-11-14 00:55:29 +00:00
mrg cd95df3a39 regen for GCC 5.5. 2017-11-14 00:54:48 +00:00
mrg 64328a215c it's ${BUILDINCS} not {BUILDINCS} 2017-11-14 00:54:38 +00:00
mrg 05bf8f96a1 mknative-gcc for some GCC 5.5. c++config.h is wrong so far. 2017-11-13 19:24:32 +00:00
martin c4d8205949 Fix what looks like a merge botch. 2017-11-13 11:49:16 +00:00
mrg ea67e31f69 merge GCC 5.5.0 in gcc.old. 2017-11-13 08:05:16 +00:00
mrg f6d92a9fbc import GCC 5.5 into gcc.old. 2017-11-13 07:46:18 +00:00
mrg d011ddea5c regen for gcc 5.5. 2017-11-13 07:21:17 +00:00
rin d3727deea0 Protect iconv stuffs by USE_WIDECHAR in addition to USE_ICONV. 2017-11-13 04:21:55 +00:00
rin 4a32e20dee Sorry, remove illegal indents. Real fix for build with USE_WIDECHAR != "yes". 2017-11-13 04:09:41 +00:00
rin 66231ee6b4 - Add -Wno-unused and -Wno-unsequenced for gcc and clang, respectively.
This is because encoding conversion macros yield such like:

    #define FILE2INT5(sp,buf,n,nlen,w,wlen) (w = n, wlen = nlen, 0)

- Silence gcc warnings on nonliteral arguments for snprintf(3) in v_increment.c,
  that are overlooked for swprintf(3) in the case of USE_WIDECHAR == "yes".
2017-11-13 02:33:13 +00:00
rin 2b97f00020 Use mvwchgat(3), which is not a macro in general (and in our case). 2017-11-13 01:51:47 +00:00
rin aee2cbfef0 Make sure to cast arguments of ISFOO and TOFOO macros into UCHAR_T. 2017-11-13 01:40:37 +00:00
rin 94d00a62d3 Use ISBLANK macro instead of isblank(3). 2017-11-13 01:37:48 +00:00
rin 0446123c92 Remove duplicate definition for ISUPPER.
No binary changes.
2017-11-13 01:34:59 +00:00
rin ed21979a9e Apply the previous fix to tre_regwexec(). 2017-11-13 00:53:05 +00:00
christos 9b217b091f check more eo, initialize shift, remove useless variable. 2017-11-12 20:56:37 +00:00
christos ac02d96ecd PR/52671: Ralph Geier, return the wide character when changing case (because
it could be wide).
2017-11-12 16:33:31 +00:00
rin 5d08a38941 Make REG_STARTEND for tre_regcomp() working actually:
- correct string length
- shift pmatch after pattern matching
- check validity of arguments
Do the same thing for tre_regwcomp()
2017-11-12 16:10:59 +00:00
rin 2d83cf0dc9 _POSIX_VDISABLE exceeds CHAR_MAX. We thus need to cast it to CHAR_T for the
case where USE_WIDECHAR != "yes", i.e., CHAR_T is char.
2017-11-12 15:33:03 +00:00
rin b72c72dd34 db_recno_t aka recno_t is uint32_t 2017-11-12 15:27:53 +00:00
rin b6e834eb55 No need to cast endp in both cases of USE_WIDECHAR == "yes" nor "no".
Note that RCHAR_T is intended to use for bundled regex, not for nvi itself.
2017-11-12 15:26:33 +00:00
rin b2095b2c80 Fix argument type of put() in common_extern.h 2017-11-12 15:23:51 +00:00
rin 4cf2a28bf8 Add missing encoding conversion before printing it. 2017-11-12 15:22:09 +00:00