Comment #2 on issue 20958 by evan.teran: crash in chrome from svn 09/02/09
http://code.google.com/p/chromium/issues/detail?id=20958

The issue seems to be that there is no NULL check after using dlsym in the  
function
localtime_r:

struct tm* localtime_r(const time_t* timep, struct tm* result) {
   if (g_am_zygote_or_renderer) {
     ProxyLocaltimeCallToBrowser(*timep, result, NULL, 0);
     return result;
   } else {
     typedef struct tm* (*LocaltimeRFunction)(const time_t* timep,
                                              struct tm* result);
     static LocaltimeRFunction libc_localtime_r;
     if (!libc_localtime_r)
       libc_localtime_r = (LocaltimeRFunction)  
dlsym(RTLD_NEXT, "localtime_r");

// ----> what if dlsym fails to find localtime_r? <----
// ----> returning NULL seems to be the only sane option. <----

     return libc_localtime_r(timep, result);
   }
}

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to