[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch #2952] getline off-by-one bugfix
From: |
James Youngman |
Subject: |
[patch #2952] getline off-by-one bugfix |
Date: |
Mon, 19 Apr 2004 15:54:56 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Epiphany/1.0.8 |
This mail is an automated notification from the patch tracker
of the project: findutils.
/**************************************************************************/
[patch #2952] Full Item Snapshot:
URL: <http://savannah.gnu.org/patch/?func=detailitem&item_id=2952>
Project: findutils
Submitted by: James Youngman
On: Mon 04/19/04 at 19:54
Category: None
Priority: 1 - Later
Resolution: None
Assigned to: None
Originator Email:
Status: Open
Summary: getline off-by-one bugfix
Original Submission: After some discussion on bug-gnulib, David Newall writes
:-
There's merit to Bruno's idea that the database must have been corrupt,
although it must necessarily have been created corrupt. 4.1.20 creates the
database in a completely different way to 4.1.7, and unfortunately I've made
major changes to my file system since last updatedb and the
bug is no longer triggered. Offset should always be in the range [0..length of
last path] and so the best I can suggest is an assertion to ensure that it's
never out of range.
It turns out that there's a completely new bug in the 4.1.20 locate, an off by
relating to the null terminator appended by getdelim2().
Here's a patch which corrects the off by one bug, and which adds the requisite
assert. It's untested to the extent that I haven't reproduced a database which
exposes the bug in 4.1.7 so I don't know if 4.1.20 has the same problem. My
guess is it doesn't because updatedb works in such a diferent way. The patch
certainly doesn't cause any new problems.
Regards,
David
CC List
-------
CC Address | Comment
------------------------------------+-----------------------------
davidn --AT-- rebel --DOT-- net --DOT-- au | David Newall
File Attachments
-------------------
-------------------------------------------------------
Date: Mon 04/19/04 at 19:54 Name: locate-off-by-one.diff Size: 1KB By: jay
David's patch
http://savannah.gnu.org/patch/download.php?item_id=2952&item_file_id=3125
For detailed info, follow this link:
<http://savannah.gnu.org/patch/?func=detailitem&item_id=2952>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [patch #2952] getline off-by-one bugfix,
James Youngman <=