Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 7836 - options structure considered harmful
Summary: options structure considered harmful
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: tmpwatch
Version: 6.1
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Preston Brown
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-12-16 12:22 UTC by David Lawrence
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2000-01-18 16:59:58 UTC

Attachments (Terms of Use)

Description Derek Tattersall 1999-12-16 12:22:33 UTC
The following mail appeared on devel-list.  I am including it here because
it exhibits a bug and part of the fix.

Notice the spelling of the option "mtiem" should be "mtime".

Subject: tmpwatch 2.0 patch
From: Vandoorselaere Yoann <>
Date: 15 Dec 1999 18:17:18 +0100 (Wed 12:17 EST)


When passing an unknow option to tmpwatch it sigsegv,
this is due to the struct options used by getopt_long not terminated by

Here is the patch :

--- tmpwatch.c.orig     Wed Dec 15 16:26:00 1999
+++ tmpwatch.c  Wed Dec 15 16:26:31 1999
@@ -271,6 +271,7 @@
     { "quiet", 0, 0, 'q' },
     { "atime", 0, 0, GETOPT_ATIME },
     { "mtiem", 0, 0, GETOPT_MTIME },
+    { 0, 0, 0, 0 }

   if (argc == 1) usage();

see you

                   -- Yoann,

Comment 1 Preston Brown 2000-01-18 16:59:59 UTC
fixed in next release.

Note You need to log in before you can comment on or make changes to this bug.