HomeFreeBSD

libucl: Fix bugs in C-style comment parser

Description

libucl: Fix bugs in C-style comment parser

When an asterisk is encountered inside a C-style comment, we first check
if there is at least one more character left in the buffer, and if that
character is a slash, which would terminate the comment. If that is not
the case, the next two characters are consumed without being inspected.
If one of those is a double quote, or the initial asterisk of an
asterisk-slash pair, we end up misparsing the comment.

MFC after: 3 days
Reviewed by: kevans, bofh
Differential Revision: https://reviews.freebsd.org/D52808

(cherry picked from commit b5e2bd5ef38181ce4a445ec19f1fa5cb6c8ea692)

Details

Provenance
desAuthored on Wed, Oct 1, 9:28 AM
Reviewer
kevans
Differential Revision
D52808: libucl: Fix bugs in C-style comment parser
Parents
rG0a8d8b0c878f: MFV: libucl: Update to 0.9.2
Branches
Unknown
Tags
Unknown