packages/net/atftp/patches/02-fix-invalid-read-in-tftp_send_request.patch
Rosen Penev 9ac737ac80
atftp: fix compilation with glibc
It's defining two functions twice for some reason.

Refreshed patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-30 16:37:57 -08:00

11 lines
297 B
Diff

--- a/tftp_io.c
+++ b/tftp_io.c
@@ -64,7 +64,7 @@ int tftp_send_request(int socket, struct
buf_index += strlen(mode);
buf_index++;
- for (i = 2; ; i++)
+ for (i = 2; i < OPT_NUMBER; i++)
{
if (strlen(tftp_options[i].option) == 0)
break;