Franz Sirl <[EMAIL PROTECTED]> writes:

> At 18:17 15.12.99 , Vandoorselaere Yoann wrote:
> >Hi,
> >
> >When passing an unknow option to tmpwatch it sigsegv,
> >this is due to the struct options used by getopt_long not terminated by NULL;
> >
> >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();
> 
> Why not fix the mtime <-> mtiem typo as well? :-)
> 

--- tmpwatch.c.orig     Wed Dec 15 18:42:51 1999
+++ tmpwatch.c  Wed Dec 15 18:43:44 1999
@@ -270,7 +270,8 @@
     { "verbose", 0, 0, 'v' },
     { "quiet", 0, 0, 'q' },
     { "atime", 0, 0, GETOPT_ATIME },
-    { "mtiem", 0, 0, GETOPT_MTIME },
+    { "mtime", 0, 0, GETOPT_MTIME },
+    { 0, 0, 0, 0 }
   };
 
   if (argc == 1) usage();





see you

-- 
                   -- Yoann,  http://www.security-addict.org
     It is well known that M$ products don't call free() after a malloc().
     The Unix community wish them good luck for their future developments.

-- 
To unsubscribe:
mail -s unsubscribe [EMAIL PROTECTED] < /dev/null

Reply via email to