]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r298521;
authorpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 28 Apr 2016 01:11:25 +0000 (01:11 +0000)
committerpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 28 Apr 2016 01:11:25 +0000 (01:11 +0000)
commitf6aebc5c194003fd9b77c56eb2578a81cf6083ac
tree69604d9a764e87d48ea8621d6ea40024e905cf4c
parenta13132196e1a07d33f7fb6f7e2566e58e4707425
MFC r298521;
regex: prevent two improbable signed integer overflows.

In matcher() we used an integer to index nsub of type size_t.
In print() we used an integer to index nstates of type sopno,
typedef'd long.
In both cases the indexes never take negative values.

Match the types to avoid any error.

git-svn-id: svn://svn.freebsd.org/base/stable/10@298726 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libc/regex/engine.c