This is the mail archive of the
ecos-bugs@sourceware.org
mailing list for the eCos project.
[Bug 1001522] Array index out of bounds in tftp_server.c
- From: bugzilla-daemon at bugs dot ecos dot sourceware dot org
- To: ecos-bugs at ecos dot sourceware dot org
- Date: Fri, 10 Aug 2012 11:16:05 +0100
- Subject: [Bug 1001522] Array index out of bounds in tftp_server.c
- Auto-submitted: auto-generated
- References: <bug-1001522-13@http.bugs.ecos.sourceware.org/>
Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001522
--- Comment #14 from Bernd Edlinger <bernd.edlinger@hotmail.de> 2012-08-10 11:16:02 BST ---
Created an attachment (id=1885)
--> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1885)
Patch to fix the warning and some error hanling in tftp_server.c
line 603: need to initalize max_s again, we're in a loop.
line 648: need to skip the for loop entirely.
iine 649: use server->num_s, because the while loop in line 607 could open less
than the max. number of sockets.
line 693: dont care to send an error packet here.
line 743: there was some kind of error. close all sockets, and release the port
semaphore.
line 752: continue the outer loop.
line 776: initialize some data, in case the tftp_stop is called before the
thread runs.
line 813: only free the data it it was possible to stop the thread.
open question: how to clean up the port semaphore here?
--
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.