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 Quanah Gibson-Mount
parent 4409febdea
commit a29b6cd5d6

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';
}