[Pkg-owncloud-commits] [owncloud-client] 44/211: owncloudcmd: Fix crash

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Oct 25 09:10:24 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 2149092c7a180b4134e10b75b72386d01a6d53fb
Author: Daniel Molkentin <danimo at owncloud.com>
Date:   Fri Oct 10 18:03:21 2014 +0200

    owncloudcmd: Fix crash
---
 src/owncloudcmd/owncloudcmd.cpp | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/owncloudcmd/owncloudcmd.cpp b/src/owncloudcmd/owncloudcmd.cpp
index ca94838..c009d08 100644
--- a/src/owncloudcmd/owncloudcmd.cpp
+++ b/src/owncloudcmd/owncloudcmd.cpp
@@ -153,10 +153,14 @@ void parseOptions( const QStringList& app_args, CmdOptions *options )
 {
     QStringList args(app_args);
 
-    if( args.count() < 3 ) {
-        const QString option = args.at(1);
-        if (option == "-v" || option == "--version") {
-            showVersion();
+    int argCount = args.count();
+
+    if( argCount < 3 ) {
+        if (argCount > 2) {
+            const QString option = args.at(1);
+            if (option == "-v" || option == "--version") {
+                showVersion();
+            }
         }
         help();
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list