Bug 1495212 - Fix command line parameter checking in ExecInExplorer plugin. r=agashlin DONTBUILD
authorMatt Howell <mhowell@mozilla.com>
Tue, 02 Oct 2018 09:23:29 -0700
changeset 495430 a07aead3f22066d063be2e5b55e2085b38039219
parent 495429 d0dbcdcab622712fecfa53d344f1876e971f704e
child 495431 8566206da1bf661588bd69be4b951eb8a94c2e92
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersagashlin
bugs1495212, 1494900
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1495212 - Fix command line parameter checking in ExecInExplorer plugin. r=agashlin DONTBUILD Because of a silly logic error I made in bug 1494900, the optional command line parameter support introduced there doesn't actually work at all; I reversed the sense of the check for the NSIS stack being empty. This fixes that by just using the check that the popstring function was already doing.
other-licenses/nsis/Contrib/ExecInExplorer/ExecInExplorer.cpp
other-licenses/nsis/Plugins/ExecInExplorer.dll
--- a/other-licenses/nsis/Contrib/ExecInExplorer/ExecInExplorer.cpp
+++ b/other-licenses/nsis/Contrib/ExecInExplorer/ExecInExplorer.cpp
@@ -181,18 +181,17 @@ Exec(HWND, int, TCHAR *, stack_t **stack
   wchar_t args[MAX_PATH + 1];
   bool rv = false;
   bool restoreArgString = false;
   // We're skipping building the C runtime to keep the file size low, so we
   // can't use a normal string initialization because that would call memset.
   path[0] = L'\0';
   args[0] = L'\0';
   popstring(stacktop, path, MAX_PATH);
-  if (!stacktop || !*stacktop) {
-    popstring(stacktop, args, MAX_PATH);
+  if (popstring(stacktop, args, MAX_PATH) == 0) {
     // This stack item may not be for us, but we don't know yet.
     restoreArgString = true;
   }
 
   if (lstrcmpW(args, L"/cmdargs") == 0) {
     popstring(stacktop, args, MAX_PATH);
     rv = ShellExecInExplorerProcess(path, args);
   } else {
index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