public inbox for ecos-bugs@sourceware.org
help / color / mirror / Atom feed
From: bugzilla-daemon@bugs.ecos.sourceware.org
To: ecos-bugs@ecos.sourceware.org
Subject: [Bug 1001522] Array index out of bounds in tftp_server.c
Date: Thu, 09 Aug 2012 17:02:00 -0000	[thread overview]
Message-ID: <20120809170143.2EEE52F78009@mail.ecoscentric.com> (raw)
In-Reply-To: <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 #11 from Bernd Edlinger <bernd.edlinger@hotmail.de> 2012-08-09 18:01:40 BST ---
(In reply to comment #10)
> Yes, you're correct.
> Using 0 as a "none" sentinal value for a socket/file descriptor is a
> bug. It's not an unusual mistake to make, and for Unix programs it's
> never detected because stdin is (almost) always fd 0, but I tripped
> over the same thing in some other eCos code I wrote years ago.
> Want to submit a patch?

Well, ok. But is no one working on the idea with the blocking socket reads?

If I am to fix that issue I would prefer a completely simple solution.

1. let only one thread enter the select.
2. never close the sockets, because that throws any additionally received
packets away.
3. post the semaphore before the switch(ntohs(hdr->th_opcode))
4. wait for the semaphore again, and go directly to the select.


Bernd.

-- 
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.


  parent reply	other threads:[~2012-08-09 17:02 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-07 15:43 [Bug 1001522] New: " bugzilla-daemon
2012-03-09  5:09 ` [Bug 1001522] " bugzilla-daemon
2012-03-09  5:13 ` bugzilla-daemon
2012-03-09 15:55 ` bugzilla-daemon
2012-03-09 16:12 ` bugzilla-daemon
2012-03-09 16:32 ` bugzilla-daemon
2012-03-09 17:39 ` bugzilla-daemon
2012-03-11  3:56 ` bugzilla-daemon
2012-03-12 14:32 ` bugzilla-daemon
2012-08-09 16:05 ` bugzilla-daemon
2012-08-09 16:28 ` bugzilla-daemon
2012-08-09 17:02 ` bugzilla-daemon [this message]
2012-08-09 17:34 ` bugzilla-daemon
2012-08-10  9:57 ` bugzilla-daemon
2012-08-10 10:16 ` bugzilla-daemon
2012-03-07 15:43 [Bug 1001522] New: " bugzilla-daemon
2012-03-09  5:09 ` [Bug 1001522] " bugzilla-daemon
2012-03-09  5:13 ` bugzilla-daemon
2012-03-09 15:55 ` bugzilla-daemon
2012-03-09 16:12 ` bugzilla-daemon
2012-03-09 16:32 ` bugzilla-daemon
2012-03-09 17:39 ` bugzilla-daemon
2012-03-11  3:56 ` bugzilla-daemon
2012-03-12 14:32 ` bugzilla-daemon
2012-08-09 16:05 ` bugzilla-daemon
2012-08-09 16:27 ` bugzilla-daemon
2012-08-09 17:02 ` bugzilla-daemon
2012-08-09 17:34 ` bugzilla-daemon
2012-08-10  9:57 ` bugzilla-daemon
2012-08-10 10:16 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120809170143.2EEE52F78009@mail.ecoscentric.com \
    --to=bugzilla-daemon@bugs.ecos.sourceware.org \
    --cc=ecos-bugs@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).