This is the mail archive of the ecos-bugs@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug 1001522] Array index out of bounds in tftp_server.c


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 the assignee for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]