Closed Bug 401608 Opened 17 years ago Closed 17 years ago

updater.exe will crash on windows if you only specify 2 args

Categories

(Toolkit :: Application Update, defect, P4)

x86
Windows Server 2003
defect

Tracking

()

RESOLVED FIXED
mozilla1.9beta2

People

(Reporter: moco, Assigned: robert.strong.bugs)

References

()

Details

(Keywords: fixed1.8.1.12, regression)

Attachments

(1 file)

updater.exe will crash on windows if you only specify 2 args

here's why:

from http://lxr.mozilla.org/seamonkey/source/toolkit/mozapps/update/src/updater/updater.cpp#1207

1206   if (gSucceeded)
1207     LaunchWinPostProcess(argv[4]);

note, we already have code before calling LaunchCallbackApp to make sure we have enough args, we just need to do something similar:

1213   if (argc > 4)
1214     LaunchCallbackApp(argv[3], argc - 4, argv + 4);
this was the root cause of bug #401327

this could be a simple fix for both branch / trunk to avoid having to fix the check_updates.sh script for 2009 -> 2010 (and for the trunk update)
Blocks: 401327
Attached patch patchSplinter Review
Assignee: nobody → robert.bugzilla
Status: NEW → ASSIGNED
Attachment #286612 - Flags: review?(sspitzer)
From comments in bug#401327, do we also need to have extra files present? Specifically, updater.ini and helper.exe?
You shouldn't need helper.exe even without this patch since the code already checks and returns early if it isn't present. With this patch we just return early if updater.exe isn't launched by the application.
bah... I was thinking about other code and it does appear to require it. Have you tried without updater.ini being present?
Comment on attachment 286612 [details] [diff] [review]
patch

r=sspitzer, thanks robert.
Attachment #286612 - Flags: review?(sspitzer) → review+
Comment on attachment 286612 [details] [diff] [review]
patch

Drivers, this is a simple / safe fix to restore the previous behavior of updater.exe when using it from the command line.
Attachment #286612 - Flags: approval1.9?
Priority: -- → P4
Target Milestone: --- → Firefox 3 M10
Attachment #286612 - Flags: approval1.9? → approval1.9+
Checked in to trunk

Checking in mozilla/toolkit/mozapps/update/src/updater/updater.cpp;
/cvsroot/mozilla/toolkit/mozapps/update/src/updater/updater.cpp,v  <--  updater.cpp
new revision: 1.30; previous revision: 1.29
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment on attachment 286612 [details] [diff] [review]
patch

Requesting 1.8.1.10. This is a simple / safe fix to restore the previous behavior of
updater.exe when using it from the command line.
Attachment #286612 - Flags: approval1.8.1.10?
Blocks: 368587
Keywords: regression
Attachment #286612 - Flags: approval1.8.1.10? → approval1.8.1.11?
Comment on attachment 286612 [details] [diff] [review]
patch

approved for 1.8.1.12, a=dveditz for release-drivers
Attachment #286612 - Flags: approval1.8.1.12? → approval1.8.1.12+
curious - did this land yet on 1.8.1.12? 
Flags: blocking1.8.1.12?
(In reply to comment #11)
> curious - did this land yet on 1.8.1.12? 

No. If it had, it would have the fixed1.8.1.12 or verified1.8.1.12 keyword. Please don't re-request blocking on bugs that already have blocking.
Flags: blocking1.8.1.12? → blocking1.8.1.12+
joduinn: changing a blocking+ flag to a blocking? flag is generally interpreted as saying "I think this should _not_ block", otherwise it would have been left in the state you wanted.
(In reply to comment #13)
> joduinn: changing a blocking+ flag to a blocking? flag is generally interpreted
> as saying "I think this should _not_ block", otherwise it would have been left
> in the state you wanted.
> 
Sorry about that; I see it is now set back as blocking1.8.1.12+ which seems right to me.
Checked in to MOZILLA_1_8_BRANCH

Checking in mozilla/toolkit/mozapps/update/src/updater/updater.cpp;
/cvsroot/mozilla/toolkit/mozapps/update/src/updater/updater.cpp,v  <--  updater.cpp
new revision: 1.11.4.15; previous revision: 1.11.4.14
done
Keywords: fixed1.8.1.12
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: