nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] segmentation fault when trying to browse to an inaccess


From: Rishabh Dave
Subject: Re: [Nano-devel] segmentation fault when trying to browse to an inaccessible directory
Date: Fri, 3 Jun 2016 20:02:46 +0530

On Fri, Jun 3, 2016 at 4:35 PM, Benno Schulenberg
<address@hidden> wrote:
>
> On Thu, Jun 2, 2016, at 14:01, Rishabh Dave wrote:
>> I have figured 2 ways to solve this bug. I have tried them, patches
>> are attached. Which method/approach should I use on to fix the bug?
>
> I would have expected first an analysis of the root cause of the bug:
> not checking the return value of get_full_path(), thus passing NULL
> to read_the_list() which then tries to get the length of NULL.

I have mentioned that in my very first mail.

> So we move that opendir() to the beginning of the loop, as in the
> second attached patch.  This is just a first try; I don't know how
> it behaves in other silly situations, but for an inaccessible dir,
> it does what I want.  So, test it, and tell me what is wrong with it.

Did that. There was some issue with the refresh but it required only
one statement to fix it. Patch is attached.

Attachment: adding-single-statement-to-0002.patch
Description: Text Data


reply via email to

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