nano-devel
[Top][All Lists]
Advanced

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

[Nano-devel] Crashes when tab-expanding filenames with percent signs


From: Ulf Härnhammar
Subject: [Nano-devel] Crashes when tab-expanding filenames with percent signs
Date: Tue, 16 Nov 2004 01:45:43 +0100
User-agent: Internet Messaging Program (IMP) 3.2.6

Hello,

GNU nano doesn't handle tab-expanding filenames containing percent signs very
well, because of a bad snprintf() call in files.c. You have used user-supplied
data as the format string instead of as parameters to *printf().

To reproduce:

1. touch xerxes x%n%n%n%n
2. nano
3. Ctrl-R x <TAB> <TAB>
4. Segmentation fault

This problem exists at least in 1.2.4, 1.3.4 and the latest CVS version.

I have attached a patch for this problem (made as a diff against 1.2.4,
but it applies to later versions as well).

// Ulf Harnhammar
   http://www.advogato.org/person/metaur/

Attachment: nano.formstring.patch
Description: Text document


reply via email to

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