indent(1): Avoid out of bound access of array codebuf.
dump_line() requires s_code to be a string, because it will call count_spaces(). Differential Revision: https://reviews.freebsd.org/D6966 (Partial) Obtained from: Piotr Stefaniak
This commit is contained in:
parent
6c99513703
commit
19fe172ace
@ -979,8 +979,10 @@ check_type:
|
||||
if (ps.want_blank)
|
||||
*e_code++ = ' ';
|
||||
ps.want_blank = false;
|
||||
if (dec_ind && s_code != e_code)
|
||||
if (dec_ind && s_code != e_code) {
|
||||
*e_code = '\0';
|
||||
dump_line();
|
||||
}
|
||||
dec_ind = 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user