Bug 401608 - updater.exe will crash on windows if you only specify 2 args. r=sspitzer, a1.9=mtschrep
authorrob_strong@exchangecode.com
Fri, 09 Nov 2007 11:47:27 -0800
changeset 7770 d51875529aa655c92768c25cb1cd43af5061ec9a
parent 7769 c4256b6b709799555320d942667accb600172e56
child 7771 f37344cf166e9549acc6edee36519f18da2d98c3
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssspitzer
bugs401608
milestone1.9b2pre
Bug 401608 - updater.exe will crash on windows if you only specify 2 args. r=sspitzer, a1.9=mtschrep
toolkit/mozapps/update/src/updater/updater.cpp
--- a/toolkit/mozapps/update/src/updater/updater.cpp
+++ b/toolkit/mozapps/update/src/updater/updater.cpp
@@ -1198,17 +1198,17 @@ int main(int argc, char **argv)
   t.Join();
 
   LogFinish();
 
 #ifdef XP_WIN
   if (exefile)
     CloseHandle(exefile);
 
-  if (gSucceeded)
+  if (gSucceeded && argc > 4)
     LaunchWinPostProcess(argv[4]);
 #endif
 
   // The callback to execute is given as the last N arguments of our command
   // line.  The first of those arguments specifies the working directory for
   // the callback.
   if (argc > 4)
     LaunchCallbackApp(argv[3], argc - 4, argv + 4);