Apple on Wednesday prepared customers for next weeks' release of the iPhone 4 and iOS 4 by updating iTunes to make it compatible with the new mobile operating system.
iTunes 9.2, which Apple posted to its download site, also patched 40 security vulnerabilities in the Windows edition, nearly all of them in WebKit, the rendering engine that powers Apple's Safari browser.
Apple plans to roll out iOS 4 -- the renamed iPhone OS 4 -- on Monday, but needed to update iTunes because it uses the music app to not only synchronize iPhones and iPod Touches to a Mac or PC, but also to push operating system upgrades to the mobile devices.
The changes to iTunes 9.2 that Apple highlighted included the ability to sync a new iPhone 4 to a Mac or PC, faster iPhone and iPod Touch backups through iOS 4, and support in iTunes for iOS 4's new folders.
Although the iTunes 9.2 update applies to both Mac and Windows PCs, the 40 patches bundled with the new version affect only the Windows version of the player program.
Of the 40 fixes, 38 are in WebKit, which iTunes uses to render some content. At least three of the 40 were accompanied by the phrase "arbitrary code execution" in Apple's advisory, indicating that they were critical flaws that could be used by attackers to hijack a PC.
Apple quashed the same bugs, as well as 10 more, last week in a record-setting Safari update.
Apple made that move then, and repeated it this year, to avoid the 2008 debacle when it released iPhone OS 2 and the iPhone 3G on the same day, a combination that brought Apple's servers to their knees as existing customers clamored for the update and new phones were activated in AT&T and Apple retail stores.
Current owners of 2008's iPhone 3G and second-generation iPod Touch, and 2009's 3GS and third-generation iPod Touch, will be able to download the free iOS 4 upgrade June 21. iOS 4 will not be available for users of the first-generation iPhone or iPod Touch, both which debuted in 2007.
Previously, Apple has charged iPod Touch owners for major operating system upgrades, but an accounting change it instituted last year allows it to provide iOS 4 gratis.
ITunes 9.2 can be downloaded for Windows XP, Vista and Windows 7, or in a version for Mac OS X 10.4.11 or later, from Apple's site. Current iTunes users can upgrade by running the Mac's Software Update or the Apple Software Update utility in Windows.
Gregg Keizer covers Microsoft, security issues, Apple, Web browsers and general technology breaking news for Computerworld. Follow Gregg on Twitter at @gkeizer or subscribe to Gregg's RSS feed . His e-mail address is firstname.lastname@example.org.