public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/1769] getopt_long() crashes if optstring is NULL
       [not found] <20051031180548.1769.wharms@bfs.de>
@ 2005-12-23 15:38 ` drepper at redhat dot com
  2006-01-15 17:35 ` wharms at bfs dot de
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: drepper at redhat dot com @ 2005-12-23 15:38 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2005-12-23 15:38 -------
There is nowhere wording that passing NULL is valid.  Your code is simply buggy.
 Fix it instead of complaining about other people's code.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


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

------- 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/1769] getopt_long() crashes if optstring is NULL
       [not found] <20051031180548.1769.wharms@bfs.de>
  2005-12-23 15:38 ` [Bug libc/1769] getopt_long() crashes if optstring is NULL drepper at redhat dot com
@ 2006-01-15 17:35 ` wharms at bfs dot de
  2006-01-15 17:36 ` wharms at bfs dot de
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: wharms at bfs dot de @ 2006-01-15 17:35 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From wharms at bfs dot de  2006-01-15 17:35 -------
Do not shoot the messenger.
the problem can easly be fixed.
i will send a patch (to the documentation) to warn about the use of NULL as
optstring.

-- 


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

------- 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/1769] getopt_long() crashes if optstring is NULL
       [not found] <20051031180548.1769.wharms@bfs.de>
  2005-12-23 15:38 ` [Bug libc/1769] getopt_long() crashes if optstring is NULL drepper at redhat dot com
  2006-01-15 17:35 ` wharms at bfs dot de
@ 2006-01-15 17:36 ` wharms at bfs dot de
  2006-01-15 17:45 ` drepper at redhat dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: wharms at bfs dot de @ 2006-01-15 17:36 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From wharms at bfs dot de  2006-01-15 17:36 -------
do not shoot the messanger.
the problem can easly be fixed
i will send a patch (to the documentation) to warn about the use of NULL as
optstring

-- 


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

------- 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/1769] getopt_long() crashes if optstring is NULL
       [not found] <20051031180548.1769.wharms@bfs.de>
                   ` (2 preceding siblings ...)
  2006-01-15 17:36 ` wharms at bfs dot de
@ 2006-01-15 17:45 ` drepper at redhat dot com
  2006-01-15 17:55 ` wharms at bfs dot de
  2006-01-15 18:10 ` drepper at redhat dot com
  5 siblings, 0 replies; 6+ messages in thread
From: drepper at redhat dot com @ 2006-01-15 17:45 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2006-01-15 17:45 -------
No need to send a patch for the documentation.  This is never documented and we
won't start because with the same argument we would have to say, for every
string function for instance, that passing a NULL pointer will cause a crash.

-- 


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

------- 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/1769] getopt_long() crashes if optstring is NULL
       [not found] <20051031180548.1769.wharms@bfs.de>
                   ` (3 preceding siblings ...)
  2006-01-15 17:45 ` drepper at redhat dot com
@ 2006-01-15 17:55 ` wharms at bfs dot de
  2006-01-15 18:10 ` drepper at redhat dot com
  5 siblings, 0 replies; 6+ messages in thread
From: wharms at bfs dot de @ 2006-01-15 17:55 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From wharms at bfs dot de  2006-01-15 17:55 -------
Subject: Re:  getopt_long() crashes if optstring is NULL

this is ok for string functions. but sometimes getopt_long() may get 
optstring==NULL because some user has a program without any short option.

re,
  walter

drepper at redhat dot com wrote:
> ------- Additional Comments From drepper at redhat dot com  2006-01-15 17:45 -------
> No need to send a patch for the documentation.  This is never documented and we
> won't start because with the same argument we would have to say, for every
> string function for instance, that passing a NULL pointer will cause a crash.
> 


-- 


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

------- 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/1769] getopt_long() crashes if optstring is NULL
       [not found] <20051031180548.1769.wharms@bfs.de>
                   ` (4 preceding siblings ...)
  2006-01-15 17:55 ` wharms at bfs dot de
@ 2006-01-15 18:10 ` drepper at redhat dot com
  5 siblings, 0 replies; 6+ messages in thread
From: drepper at redhat dot com @ 2006-01-15 18:10 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2006-01-15 18:10 -------
It's exactly the same issue.  If a function expects a string passing anything
else is undefined behavior and will likely lead to crashes.

-- 


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

------- 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:[~2006-01-15 18:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20051031180548.1769.wharms@bfs.de>
2005-12-23 15:38 ` [Bug libc/1769] getopt_long() crashes if optstring is NULL drepper at redhat dot com
2006-01-15 17:35 ` wharms at bfs dot de
2006-01-15 17:36 ` wharms at bfs dot de
2006-01-15 17:45 ` drepper at redhat dot com
2006-01-15 17:55 ` wharms at bfs dot de
2006-01-15 18:10 ` drepper at redhat dot com

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