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
* [Bug libc/4181] inet6_opt_append is broken
2007-03-13 6:34 [Bug libc/4181] New: inet6_opt_append is broken hugosantos at gmail dot com
@ 2007-03-13 6:36 ` hugosantos at gmail dot com
2007-03-15 11:33 ` jakub at redhat dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: hugosantos at gmail dot com @ 2007-03-13 6:36 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From hugosantos at gmail dot com 2007-03-13 06:36 -------
Created an attachment (id=1609)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=1609&action=view)
RFC 3542 adapted example
Simple test adapted from the RFC 3542 supplied example.
Fails with:
$ ./test-inet6-opt
test-inet6-opt: test-inet6-opt.c:29: test_inet6_opt: Assertion `currentlen !=
-1' failed.
--
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
* [Bug libc/4181] inet6_opt_append is broken
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
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jakub at redhat dot com @ 2007-03-15 11:33 UTC (permalink / raw)
To: glibc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|drepper at redhat dot com |jakub at redhat dot com
Status|NEW |ASSIGNED
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
* [Bug libc/4181] inet6_opt_append is broken
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
4 siblings, 0 replies; 6+ messages in thread
From: jakub at redhat dot com @ 2007-03-15 12:11 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From jakub at redhat dot com 2007-03-15 12:10 -------
http://sources.redhat.com/ml/libc-hacker/2007-03/msg00021.html
--
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
* [Bug libc/4181] inet6_opt_append is broken
2007-03-13 6:34 [Bug libc/4181] New: inet6_opt_append is broken hugosantos at gmail dot com
` (2 preceding siblings ...)
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
4 siblings, 0 replies; 6+ messages in thread
From: drepper at redhat dot com @ 2007-03-15 20:11 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From drepper at redhat dot com 2007-03-15 20:11 -------
Fixed in cvs.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
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
* [Bug libc/4181] inet6_opt_append is broken
2007-03-13 6:34 [Bug libc/4181] New: inet6_opt_append is broken hugosantos at gmail dot com
` (3 preceding siblings ...)
2007-03-15 20:11 ` drepper at redhat dot com
@ 2007-07-12 15:01 ` cvs-commit at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2007-07-12 15:01 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2007-07-12 15:01 -------
Subject: Bug 4181
CVSROOT: /cvs/glibc
Module name: libc
Branch: glibc-2_5-branch
Changes by: jakub@sourceware.org 2007-07-12 15:00:49
Modified files:
. : ChangeLog
inet : Makefile inet6_opt.c
Added files:
inet : test-inet6_opt.c
Log message:
2007-03-15 Jakub Jelinek <jakub@redhat.com>
[BZ #4181]
* inet/inet6_opt.c (add_padding): Only insert padding if npad > 0.
(inet6_opt_append): Don't check extlen is big enough if extbuf
is NULL.
(inet6_opt_finish): Likewise.
* inet/Makefile (tests): Add test-inet6_opt.
* inet/test-inet6_opt.c: New test.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/ChangeLog.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.10362.2.55&r2=1.10362.2.56
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/inet/test-inet6_opt.c.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=NONE&r2=1.1.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/inet/Makefile.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.59&r2=1.59.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/inet/inet6_opt.c.diff?cvsroot=glibc&only_with_tag=glibc-2_5-branch&r1=1.1&r2=1.1.4.1
--
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).