mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-09-24 00:54:01 +08:00
Fix oss-fuzz flaky issue
Caused by password file with many duplicate usernames, unlikely to occur in practice
This commit is contained in:
@@ -285,7 +285,7 @@ static int update_pwuser_cb(FILE *fptr, FILE *ftmp, const char *username, const
|
||||
UNUSED(fptr);
|
||||
UNUSED(password);
|
||||
|
||||
if(strcmp(username, helper->username)){
|
||||
if(helper->found || strcmp(username, helper->username)){
|
||||
/* If this isn't the matching user, then writing out the exiting line */
|
||||
fprintf(ftmp, "%s", line);
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user