parent
bfb373d774
commit
47ae6dd0e2
@ -5,6 +5,9 @@ Broker:
|
||||
- Fix `max_queued_message 0` stopping clients from receiving messages.
|
||||
Closes #2879.
|
||||
|
||||
Apps:
|
||||
- Fix `mosquitto_passwd -U` backup file creation. Closes #2873.
|
||||
|
||||
|
||||
2.0.16 - 2023-08-16
|
||||
===================
|
||||
|
@ -629,13 +629,14 @@ int main(int argc, char *argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
backup_file = malloc((size_t)strlen(password_file)+strlen(".backup.XXXXXX"));
|
||||
size_t len = strlen(password_file) + strlen(".backup.XXXXXX") + 1;
|
||||
backup_file = malloc(len);
|
||||
if(!backup_file){
|
||||
fprintf(stderr, "Error: Out of memory.\n");
|
||||
free(password_file);
|
||||
return 1;
|
||||
}
|
||||
snprintf(backup_file, strlen(password_file)+5, "%s.backup.XXXXXX", password_file);
|
||||
snprintf(backup_file, len, "%s.backup.XXXXXX", password_file);
|
||||
free(password_file);
|
||||
password_file = NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user