public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/4181] New: inet6_opt_append is broken
@ 2007-03-13  6:34 hugosantos at gmail dot com
  2007-03-13  6:36 ` [Bug libc/4181] " hugosantos at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: hugosantos at gmail dot com @ 2007-03-13  6:34 UTC (permalink / raw)
  To: glibc-bugs

inet6_opt_append is broken and does not work with RFC 3542 supplied examples.

The problem is the following code:

  /* Now we can check whether the buffer is large enough.  */
  if (data_offset + npad + len > extlen)
    return -1;

Which should only be called if extbuf isn't NULL as any extlen is valid if
extbuf == NULL.

x = inet6_opt_init(NULL, 0);
x = inet6_opt_append(NULL, 0, x, OPT_FOO, size, align, NULL); /* should work but
fails */

-- 
           Summary: inet6_opt_append is broken
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: hugosantos at gmail dot com
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: pc-linux-gnu
  GCC host triplet: pc-linux-gnu
GCC target triplet: pc-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=4181

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-07-12 15:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-13  6:34 [Bug libc/4181] New: inet6_opt_append is broken hugosantos at gmail dot com
2007-03-13  6:36 ` [Bug libc/4181] " hugosantos at gmail dot com
2007-03-15 11:33 ` jakub at redhat dot com
2007-03-15 12:11 ` jakub at redhat dot com
2007-03-15 20:11 ` drepper at redhat dot com
2007-07-12 15:01 ` cvs-commit at gcc dot gnu dot org

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