From: David Levine Date: Wed, 8 Dec 2010 20:36:36 +0000 (-0600) Subject: * uip/whatnowsbr.c: enforce requirement of at least one file X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/2ead8819603a21a03ee51440dc5617c5df1ed8da?ds=sidebyside;hp=20dbca31df3ce9b0cebfb5977607d9c3ef0d86d7 * uip/whatnowsbr.c: enforce requirement of at least one file argument to attach command. --- diff --git a/ChangeLog b/ChangeLog index 1345dceb..e7ee1265 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-12-08 David Levine + + * uip/whatnowsbr.c: enforce requirement of at least one file + argument to attach command. + 2010-12-08 David Levine * man/send.man: added name= portion to Content-Type diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index 723d4087..6541b42e 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -409,6 +409,11 @@ WhatNow (int argc, char **argv) break; } + if (*(argp+1) == (char *)0) { + advise((char *)0, "attach command requires file argument(s)."); + break; + } + /* * Build a command line that causes the user's shell to list the file name * arguments. This handles and wildcard expansion, tilde expansion, etc.