By Gregg Keizer
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 . Like last year, Apple is launching iOS 4 several days before it starts selling the iPhone 4 , or delivering pre-orders to customers who managed to make it through this week's ordering fiasco . 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.