[Top][All Lists]

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

[Nano-devel] segmentation fault when trying to browse to an inaccessible

From: Rishabh Dave
Subject: [Nano-devel] segmentation fault when trying to browse to an inaccessible directory
Date: Fri, 27 May 2016 18:41:31 +0530


Link to the bug -

Problem seems to begin at get_full_path(). It returns NULL which gets
mallocstrassn()-ed into the path. This happens in do_browser(). Later,
when we do strlen(path) in read_the_list() it leads to an error. It
can be seen while following the recipe (which you gave on the bug's
page) with valgrind options '--leak-check=yes' and '-v'.

I have attached a patch to demonstrate and bypass error temporarily.
It may induce bugs as I have written it only to confirm the cause for
the bug. It also generates a file named
"". The report (so called by me) is
attached hoping that it may avoid pain of applying patch and testing
it.  :)

stat() and opendir() never take permissions for a directory into
account. I haven't figured why all this never happens to '/root' and
'/home/lost+found' but happens to 'noaccess'. Same behaviour was seen
with a stand-alone program I wrote and ran.

Attachment: get_full_path-returns-null.patch
Description: Text Data

Description: Binary data

reply via email to

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