Przeglądaj źródła

Merge pull request #1913 from dddaniel/master

atftp: fix invalid read in tftp_send_request.
Ted Hess 9 lat temu
rodzic
commit
86d352bf65

+ 2
- 2
net/atftp/Makefile Wyświetl plik

@@ -1,5 +1,5 @@
1 1
 #
2
-# Copyright (C) 2006-2014 OpenWrt.org
2
+# Copyright (C) 2006-2015 OpenWrt.org
3 3
 #
4 4
 # This is free software, licensed under the GNU General Public License v2.
5 5
 # See /LICENSE for more information.
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
8 8
 
9 9
 PKG_NAME:=atftp
10 10
 PKG_VERSION:=0.7.1
11
-PKG_RELEASE:=3
11
+PKG_RELEASE:=4
12 12
 PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
13 13
 PKG_LICENSE:=GPL-2.0
14 14
 

+ 13
- 0
net/atftp/patches/02-fix-invalid-read-in-tftp_send_request.patch Wyświetl plik

@@ -0,0 +1,13 @@
1
+diff --git a/tftp_io.c b/tftp_io.c
2
+index 605a9c2..6cce1f4 100644
3
+--- a/tftp_io.c
4
++++ b/tftp_io.c
5
+@@ -64,7 +64,7 @@ int tftp_send_request(int socket, struct sockaddr_storage *sa, short type,
6
+      buf_index += strlen(mode);
7
+      buf_index++;
8
+      
9
+-     for (i = 2; ; i++)
10
++     for (i = 2; i < OPT_NUMBER; i++)
11
+      {
12
+           if (strlen(tftp_options[i].option) == 0)
13
+                break;