libcommon: mosquitto_file_read should use "rb", not "rt".

This commit is contained in:
Roger Light 2026-04-27 09:25:54 +01:00
parent 78631a0da6
commit 76c6dd3fe3

View file

@ -457,7 +457,7 @@ int mosquitto_read_file(const char *file, bool restrict_read, char **buf, size_t
if(buflen){
*buflen = 0;
}
fptr = mosquitto_fopen(file, "rt", restrict_read);
fptr = mosquitto_fopen(file, "rb", restrict_read);
if(fptr == NULL){
return MOSQ_ERR_ERRNO;
}