On Wed, Oct 21, 2009 at 10:09 PM, Lei Zhang <thes...@chromium.org> wrote:
>
> Hi Linux folks,
>
> This is a kind reminder to check the return values from GTK functions.
> Every time you put the unchecked result from, say,
> gtk_file_chooser_get_filename() into a FilePath or std::string, you
> risk a browser process crash if the result is NULL.
>
> I just triaged several crashes of this type. There's probably more...
>
> http://code.google.com/p/chromium/issues/detail?id=25490
> http://code.google.com/p/chromium/issues/detail?id=25491
> http://code.google.com/p/chromium/issues/detail?id=25493
> http://code.google.com/p/chromium/issues/detail?id=25494
>

Let me couch this by noting that if the return value is const gchar*
then it's usually "guaranteed" to be non-null.

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to