This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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 libc/4181] New: inet6_opt_append is broken


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.


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