HomeFreeBSD

indent(1): Avoid potential use-after-free.

Description

indent(1): Avoid potential use-after-free.

last_bl is a char pointer that tracks the last blank character in a
comment, which is used for wrapping long comment lines. Since the
underlying array may be reallocated, make sure last_bl is up to date when
that happens.

Differential Revision: https://reviews.freebsd.org/D6966 (Partial)
Obtained from: Piotr Stefaniak

Details

Provenance
pfgAuthored on
Parents
rS303482: indent(1): Avoid out of bound access of array codebuf.
Branches
Unknown
Tags
Unknown