Fix crash in mailcap reader

This commit is contained in:
Vedran Ljubovic 2008-10-29 11:14:51 +00:00
parent a54c25ff78
commit 24c33dce6d

View File

@ -152,7 +152,7 @@ void read_files() {
}
// Use just the first BUFLEN chars
strncpy(buffer, line.c_str(), BUFLEN);
buffer[BUFLEN]='\0';
buffer[BUFLEN-1]='\0';
}
// Parse line