Re: I installed a package! woo-hoo!
On Wed, 16 Dec 1998, Havoc Pennington wrote:
>
> Bug report: apparently it's possible that Stop < Start in the code below,
> which causes bad things to happen. I haven't figured out yet exactly
> what causes it, no time tonight.
>
OK, the problem is that the loop in pkgTagSection::Scan bails out here:
Stop = (const char *)memchr(Stop,'\n',End - Stop);
if (Stop == 0)
return false;
If the field being parsed ends in the middle of a line, we don't find a
newline and we return; but Indexes[TagCount] remains unset, so the end of
the previously parsed field is unknown. Then in Find we are hosed because
we assume Indexes[I+1] > Indexes[I] when Indexes[I+1] == 0.
Closer to the root cause of the problem is that the string being parsed
ends in the middle of a line - it's from the wmaker description -
" disapeared because newstyle and superflu"
there's a null after the u. I don't know why this got chopped.
BTW, can I change debRecordParser::LongDesc() to read:
{
return FindTag("Description");
}
or is there a reason it's not enabled right now?
Havoc
Reply to: