Skip to content

Commit

Permalink
Fix using offset before range check
Browse files Browse the repository at this point in the history
  • Loading branch information
szsam committed Apr 17, 2023
1 parent 2973652 commit 3ab7cab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/ftp/nxd_ftp_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -5522,7 +5522,7 @@ ULONG temp = 0;

/* Skip non numeric text and whitespace. */
i = 3;
while (((buffer_ptr[i] > '9') || (buffer_ptr[i] < '0')) && (i < packet_ptr -> nx_packet_length))
while ((i < packet_ptr -> nx_packet_length) && ((buffer_ptr[i] > '9') || (buffer_ptr[i] < '0')))
{
i++;
}
Expand Down

0 comments on commit 3ab7cab

Please sign in to comment.