summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Hindenburg <kurt.hindenburg@gmail.com>2012-03-31 01:35:21 (GMT)
committerKurt Hindenburg <kurt.hindenburg@gmail.com>2012-03-31 01:35:21 (GMT)
commit6cda78850fdbf7e155b73fe55fd5dfcfb8a3ff9d (patch)
treed4405c22af24bf0d36c8cec7bd8fa621d93719b6
parentbf3e57e94b54c1c4337d7960e0fda0ef98156451 (diff)
Fix crash for 'ssh -t localhost bash -l'v4.8.2
This needs to be handled better but for now stop crashing. BUG: 297156
-rw-r--r--src/ProcessInfo.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ProcessInfo.cpp b/src/ProcessInfo.cpp
index ab24d5e..3754239 100644
--- a/src/ProcessInfo.cpp
+++ b/src/ProcessInfo.cpp
@@ -1040,7 +1040,10 @@ SSHProcessInfo::SSHProcessInfo(const ProcessInfo& process)
}
else
{
- argument = args[i+1] ;
+ // Verify correct # arguments are given
+ if ((i + 1) < args.count()) {
+ argument = args[i + 1];
+ }
i++;
}