Hi,Due to some crash reports we've been getting lately I discovered that apr in most time related functions don't check the return values of the win API functions. That leads to crashes.
For example, most crash reports we receive are happening in SystemTimeToAprExpTime() (file time\win32\time.c) because the statement dayoffset[xt->tm_mon] accesses illegal memory, and that's because 'xt' is not initialized at all. I've discovered that this happens (just one example) if in apr_time_exp_lt(), the call to SystemTimeToTzSpecificLocalTime() fails.
The reason we only got these crash reports very recently (we didn't get those before) is that the SP3 for Windows XP updated some registry keys to handle more daylight-saving infos for different locales. Apparently, SP3 only causes these problems if users tried to adjust their settings manually before according to this KB article:
http://support.microsoft.com/kb/914387I'm not sure if that article has a bug or if those users experiencing the crash made a mistake, but looking at the amount of crash reports we get I doubt it's a user mistake. And considering that many people haven't installed SP3 yet I'm sure we will get a lot more of those reports in the future.
So to make it short:I think apr should check the return values of those win API calls and return an error.
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
signature.asc
Description: OpenPGP digital signature
