gcmd-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gcmd-dev] Bug 351952 fix: crash when searching for locked files by


From: Piotr Eljasiak
Subject: Re: [gcmd-dev] Bug 351952 fix: crash when searching for locked files by content
Date: Sun, 28 Jan 2007 00:56:24 +0100

> There is bug when searching for files by content and the file has no 
> read permission. The file is found (list permission is set in 
> directory), but the content cannot be read. In file 
> gnome-cmd-search-dialog.c in function content_matches on line 226 there 
> is no check for NULL buffer returned from load_file.
> 
> The function should be:
> 
> /**
>  * Determinates if the content of a file matches an regexp
>  *
>  */
> static gboolean
> content_matches (GnomeCmdFile *finfo, SearchData *data)
> {
>     static regmatch_t match;
>     gint ret = REG_NOMATCH;
>     gchar *buf = load_file (finfo);
>     if (buf)
>     {
>         ret = regexec (data->content_regex, buf, 1, &match, 0);
>         g_free (buf);
>     }
>     return (ret == 0);
> }
> 
> Please update it, it will fix bug 351952 and maybe 399464 too.

Thanks, committed.


Piotr





reply via email to

[Prev in Thread] Current Thread [Next in Thread]