[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] Upcoming release of 1.2.2rc1
From: |
Robin Farine |
Subject: |
Re: [Gnu-arch-users] Upcoming release of 1.2.2rc1 |
Date: |
Mon, 30 Aug 2004 19:40:19 +0200 |
User-agent: |
KMail/1.6.2 |
On Monday 30 August 2004 20.22, Robert Anderson wrote:
> Why not just search for the tag _start_ in the 1st 1k, and then
> _use the whole tag_ even if it crosses the 1k boundary?
That would be a nice solution but the function that looks for an
embedded id, inv-id.c:implicit_id(), just reads the first (and the
last) 1024 bytes into a buffer and then look for an id in this
buffer. The code needed to accept an id that crosses the boundary
would become a bit complicated.
So I think it would be easier to just ignore this case and just skip
the candidate. As the patch below illustrates, if a candidate is
found but no newline character follows, just ignore it.
Robin
--- orig/libarch/inv-ids.c
+++ mod/libarch/inv-ids.c
@@ -1417,12 +1417,9 @@
++line;
eol = str_chr_index_n (buf + line, amt - line, '\n');
- if (!eol)
- eol = buf + amt;
-
- if (0 == (eol - (t_uchar *)(buf + line)))
+ if (!eol || 0 == (eol - (t_uchar *)(buf + line)))
{
- /* an empty id
+ /* a truncated or empty id
*/
break;
}
- Re: [Gnu-arch-users] Upcoming release of 1.2.2rc1, (continued)
Re: [Gnu-arch-users] Upcoming release of 1.2.2rc1, James Blackwell, 2004/08/30
Re: [Gnu-arch-users] Upcoming release of 1.2.2rc1, Jani Monoses, 2004/08/30
Re: [Gnu-arch-users] Upcoming release of 1.2.2rc1, Robert Anderson, 2004/08/30
Re: [Gnu-arch-users] Upcoming release of 1.2.2rc1, Robert Anderson, 2004/08/30
Re: [Gnu-arch-users] Upcoming release of 1.2.2rc1, Robert Anderson, 2004/08/30