href with odd quotes and garbled attribute crashes tidy's ReportAttrError()

The following:

<html>
<head>
<title>Tidy crasher</title>
</head>
<body bgcolor="#FFFFFF">
  Very bad href here:
  <a href="oops.html badattr="Content-Type">
</body>
</html>

Note inappropriate attributes and an odd number of quotation marks.  Run
tidy -errors on it, and perhaps not surprisingly... kaboom!

zsh% gdb tidy
Tidy (vers 4th August 2000)
...
line 7 column 4 - Warning: <a> unknown attribute value "
Program received signal SIGSEGV, Segmentation fault.
0xef724784 in strlen ()
(gdb) bt
#0  0xef724784 in strlen ()
#1  0xef75aa1c in _doprnt ()
#2  0xef763c98 in vfprintf ()
#3  0x24a78 in tidy_out ()
#4  0x2506c in ReportAttrError ()
#5  0x1e8a0 in ParseAttrs ()
#6  0x1d530 in GetToken ()
#7  0x19764 in ParseBody ()
#8  0x15b38 in ParseTag ()
#9  0x19f68 in ParseHTML ()
#10 0x1a06c in ParseDocument ()
#11 0x28878 in main ()

% uname -a
SunOS webdev 5.6 Generic_105181-21 sun4u sparc SUNW,Ultra-60

Awesome tool, thanks.
--
=S Page, www.macromedia.com's site engineer

  "I'm trying to ban e-mail attachments.  I just want an ASCII e-mail.
  If you want to show me something, put it in a Web page, publish it,
  give me the URL, and I'll look at it.  That's the new model."
  Scott McNealy, CEO of Sun Microsystems, in May 1997 Upside magazine.

Received on Tuesday, 7 November 2000 01:59:40 UTC