Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 204519
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Lance Albertson <ramereth@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
cronolog-getopt-long.patch getopt_long requires that the last record in the longopts array is filled with 0 as documented in getopt(3) patch Carlo Marcelo Arenas Belon 2008-01-06 08:24 0000 1.08 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 204519 depends on: Show dependency tree
Bug 204519 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2008-01-06 08:21 0000
cronolog leaves the array of long options as used in cronolog.c and cronotest.c
without the required 0 filled last record, therefore the use of an unknown long
option will traverse the array and segfault as shown in the linked URL

amd64 (at least for me) seems easier to replicate the problem as can be seen by
:

$ /usr/sbin/cronolog --unknown-longopt
Segmentation fault

------- Comment #1 From Carlo Marcelo Arenas Belon 2008-01-06 08:23:30 0000 -------
the same problem is also present in the test framework cronotest.c which
doesn't get installed

------- Comment #2 From Carlo Marcelo Arenas Belon 2008-01-06 08:24:57 0000 -------
Created an attachment (id=140259) [details]
getopt_long requires that the last record in the longopts array is filled with
0 as documented in getopt(3)

------- Comment #3 From Lance Albertson 2008-05-06 20:03:29 0000 -------
Committed with patch, thanks!

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug