Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/lib/libc/regex



On 14.01.2016 21:41, Christos Zoulas wrote:
> +The
> +.Fa rm
> +array must be at least 10 elements long, and should contain the result
> +of the matches from a previous
> +.Fn regexec
> +call.

Could we have an argument to regasub(3)/regnsub(3) "size_t nmatch" like
in regexec(3), instead of assuming >= 10 elements long?

It might not be too late to alter this function. There is only 1 user in
GCC and no stable releases with this API.

My rationale is to sanitize these interfaces without caching the number
of elements for a regexec(3) call in a sanitizer. Additionally we could
have an internal sanity check to prevent out of bound operations on the
"regmatch_t *" type.

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index