From 85f41f16a1c2a5033c0722219f32f09430c5e9ed Mon Sep 17 00:00:00 2001 From: Paul Tagliamonte Date: Sat, 17 Aug 2013 15:18:31 -0400 Subject: [PATCH] Add the f argument to optparse to avoid segfault. Otherwise optarg is set to 0, and we segfault when we try to strcpy it. --- ttyclock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ttyclock.c b/ttyclock.c index 5e3fb3a..1a43ffb 100644 --- a/ttyclock.c +++ b/ttyclock.c @@ -465,7 +465,7 @@ main(int argc, char **argv) /* Default blink */ ttyclock->option.blink = False; - while ((c = getopt(argc, argv, "utvsrcihfDBd:C:")) != -1) + while ((c = getopt(argc, argv, "utvsrcihf:DBd:C:")) != -1) { switch(c) {