bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-wget] Fix for crash on invalid STYLE tag


From: Gijs van Tulder
Subject: [Bug-wget] Fix for crash on invalid STYLE tag
Date: Sun, 01 Apr 2012 22:45:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120310 Thunderbird/11.0

Hi,

Here's a tiny fix for a problem in the HTML parsing in html-url.c.

Wget crashes on HTML files that contain an incomplete STYLE tag, e.g.:

  <style </style>

If it finds one of those, it calls get_urls_css with an invalid buffer (the buffer has a negative length), which leads to this crash:

  bad buffer in yy_scan_bytes()
  ERROR (2)

The attached patch checks the buffer before calling get_urls_css. The content of the incomplete tag still won't be parsed, but at least it will no longer lead to a crash.

Regards,

Gijs

Attachment: wget-style-bug.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]