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

Details

Provenance
desAuthored on Wed, Oct 1, 9:28 AM
Reviewer
kevans
Differential Revision
D52808: libucl: Fix bugs in C-style comment parser
Parents
rG7bc6ec1a255d: Revert "acpi_powerres: Fix turning off power resources on first D-state switch"
Branches
Unknown
Tags
Unknown