From: Brendan Cully Date: Sat, 23 Aug 2008 22:21:42 +0000 (-0700) Subject: Fix infinite loop with "mutt -", introduced in [31c9e9727d42]. X-Git-Tag: mutt-1-5-19-rel~158 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e3c2ce643d645b0da8f92579b66d95cd8d3d8e8a;p=mutt Fix infinite loop with "mutt -", introduced in [31c9e9727d42]. Treats - as a non-option argument. It would be reasonable to treat it as an error instead. --- diff --git a/ChangeLog b/ChangeLog index 00f40e73..4f9600de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,32 +1,40 @@ +2008-08-19 16:44 -0400 Aron Griffis (31c9e9727d42) + + * main.c: Handle -- correctly with or without -a, closes #3097 + + Prefix optstring with "+" to force POSIX behavior on GNU getopt, and + thereby prevent reordering argv. This allows us to correctly handle + mixed addresses, attachments, options and the double-dash to signal + end-of-options. + + Signed-off-by: Aron Griffis + +2008-08-22 17:49 +0200 Rocco Rutte (6fd1fa2d98bc) + + * doc/manual.xml.head: Manual: fix/improve markup/content, see + #3109 + 2008-08-21 10:42 +0200 Rocco Rutte (15d93fe50e62) * init.h: Clarify documentation for $config_charset. Closes #2021. -2008-08-21 10:30 +0200 Rocco Rutte (bc8b07e9e95b) - - * ChangeLog, doc/manual.xml.head: Improve color/mono command synopsis. + * doc/manual.xml.head: Improve color/mono command synopsis. Closes #2630. -2008-08-21 09:36 +0200 Rocco Rutte (4139ac196ca8) - * init.h: Better document the effect of $thorough_search being unset. Closes #3104. -2008-08-21 07:33 +0200 Rocco Rutte (9373afa9278f) - - * ChangeLog, mutt_ssl.c: Port certificate host checking from msmtp to + * mutt_ssl.c: Port certificate host checking from msmtp to mutt. It supports IDN, wildcards and extracting the hostname from - subject alternative field as well as common name which should be the - same gnutls supports. Closes #3087. + subject alternative field as well as common name which should be + the same gnutls supports. Closes #3087. 2008-08-19 13:17 -0700 Brendan Cully (573d1aab3c89) * init.c: Silence an incorrect uninitialized variable warning. -2008-08-19 13:14 -0700 Brendan Cully (6b4f25cd9dac) - - * ChangeLog, init.h: Better documentation for how quote_regexp - determines quote level. Closes #1463. + * init.h: Better documentation for how quote_regexp determines + quote level. Closes #1463. 2008-08-19 09:39 +0200 Rocco Rutte (3e850c6e43fd) diff --git a/main.c b/main.c index d96f46e5..ca1a3c67 100644 --- a/main.c +++ b/main.c @@ -582,7 +582,7 @@ int main (int argc, char **argv) */ for (; optind < argc; optind++) { - if (argv[optind][0] == '-') + if (argv[optind][0] == '-' && argv[optind][1] != '\0') { if (argv[optind][1] == '-' && argv[optind][2] == '\0') double_dash = optind; /* quit outer loop after getopt */