Skip to content

Commit

Permalink
Merge pull request #6 from meme/uaf
Browse files Browse the repository at this point in the history
Fix UAF in process_recv
  • Loading branch information
strazzere authored Jun 25, 2021
2 parents 56e7909 + a880419 commit 6b0e4c3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions usbfluxd/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -977,8 +977,9 @@ static void process_recv(struct mux_client *client)
if(client->ib_size < hdr->length)
return;
}
client_command(client, hdr);
client->ib_size = 0;
if (client_command(client, hdr) == 0) {
client->ib_size = 0;
}
}

void client_process(int fd, short events)
Expand Down

0 comments on commit 6b0e4c3

Please sign in to comment.