[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug#598932: info crashes when selecting a node inside of an info fil
From: |
Norbert Preining |
Subject: |
Re: Bug#598932: info crashes when selecting a node inside of an info file |
Date: |
Fri, 8 Oct 2010 10:15:42 +0900 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hi Sergey,
thanks for the patch, might I ask you one thing? We are using 4.13a
in Debian and that is in deep freeze. So to get this fixed before
release I want to include only *minimal* changes.
I boiled down your patch to the following:
---
info/nodes.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
Index: texinfo-4.13a.dfsg.1/info/nodes.c
===================================================================
--- texinfo-4.13a.dfsg.1.orig/info/nodes.c 2010-10-08 10:00:22.000000000
+0900
+++ texinfo-4.13a.dfsg.1/info/nodes.c 2010-10-08 10:13:25.000000000 +0900
@@ -960,6 +960,9 @@
/* If we were able to find this file and load it, then return
the node within it. */
{
+ if (!(tag->nodestart >= 0 && tag->nodestart < subfile->filesize))
+ return NULL;
+
NODE *node = xmalloc (sizeof (NODE));
node->filename = subfile->fullpath;
node->parent = NULL;
@@ -997,10 +1000,16 @@
min = max = DEFAULT_INFO_FUDGE;
- if (tag->nodestart < DEFAULT_INFO_FUDGE)
+ if (strict_node_location_p)
+ {
+ min = 0;
+ max = 2;
+ }
+
+ if (tag->nodestart < min)
min = tag->nodestart;
- if (DEFAULT_INFO_FUDGE >
+ if (max >
(subfile->filesize - tag->nodestart))
max = subfile->filesize - tag->nodestart;
Does that look ok for you?
Thanks a lot and all the best
Norbert
------------------------------------------------------------------------
Norbert Preining address@hidden, logic.at, debian.org}
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
DOBWALLS (pl.n.)
The now hard-boiled bits of nastiness which have to be prised off
crockery by hand after it has been through a dishwasher.
--- Douglas Adams, The Meaning of Liff
Re: Bug#598932: info crashes when selecting a node inside of an info file, Hilmar Preusse, 2010/10/07