Supplementary fix for bug 316177 - don't overrun the end of the command line

This commit is contained in:
bsmedberg%covad.net 2006-02-02 19:30:38 +00:00
parent 169078fb2f
commit 1ffc3a6a5c

View File

@ -1385,7 +1385,7 @@ nsMsgComposeService::Handle(nsICommandLine* aCmdLine)
rv = aCmdLine->GetLength(&count);
NS_ENSURE_SUCCESS(rv, rv);
if (count > found) {
if (count > found + 1) {
aCmdLine->GetArgument(found + 1, uristr);
if (StringBeginsWith(uristr, NS_LITERAL_STRING("mailto:")) ||
StringBeginsWith(uristr, NS_LITERAL_STRING("to=")) ||