ITS#9578 ldif: terminate buf after truncating \r

This commit is contained in:
Konstantin Andreev 2021-06-12 11:41:44 +00:00 committed by Howard Chu
parent 3e45c71d29
commit 00529facbe

View File

@ -829,6 +829,7 @@ ldif_read_record(
/* Squash \r\n to \n */
if ( len > 1 && line[len-2] == '\r' ) {
len--;
line[len] = '\0';
line[len-1] = '\n';
}