bugGNU Wget - Bugs: bug #42953, CSS URI parser broken


bug #42953: CSS URI parser broken

Submitted by:  None
Submitted on:  Sat 09 Aug 2014 04:01:27 PM UTC  
Category:  Program Logic Severity:  3 - Normal
Priority:  5 - Normal Status:  Fixed
Privacy:  Public Assigned to:  None
Originator Name:  AtomicDryad Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  trunk
Operating System:  GNU/Linux Reproducibility:  Every Time
Fixed Release:  None Planned Release:  None
Regression:  None Work Required:  None
Patch Included:  Yes

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Mon 27 Oct 2014 02:54:27 PM UTC, comment #1:

That has been fixed for Wget 1.16.

commit 601b282cd8e7b2783f818469f55923e91cc4e1a8
Author: Ángel González <keisial@gmail.com>
Date: Wed Oct 22 01:10:21 2014 +0200

css-url.c (get_uri_string): Fix regression from 8e6de1fb5

Solves the issue discovered by Gabriel Somlo and reported in the ml thread
"Regression in git master branch (commit 8e6de1fb5ff0ca0c749da7db634a1b1e3a1215a2)"

Thanks for reporting.

Tim Ruehsen <rockdaboot>
Project Administrator
Sat 09 Aug 2014 04:01:27 PM UTC, original submission:

Since the commit 8e6de1f on 2014-06-09 the CSS parser fails to trim url() entries, specifically everything past ')' like this:
# ./src/wget http://www.cpan.org/misc/css/cpan.css -qO-|grep -m1 url
background: white url(../images/bg_gradient.jpg) repeat-x left top;

This causes:
# ./src/wget -p -k -E http://www.cpan.org 2>&1|grep ';'
--2014-08-09 09:58:21-- http://www.cpan.org/misc/images/bg_gradient.jpg)%20repeat-x%20left%20top;%0A%20%20%20%20max-width:%2070em;%0A%7D%0Atd

I'm attaching a patch which changes xstrdup to xmemdup, with the relevent length parameter.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #31879:  really-fix-css.diff added by None (618B - application/octet-stream - Oops, using xmemdup that way resulted in corrupted string)
file #31878:  fix-css.diff added by None (298B - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by darnir (Updated the item)
  • -email is unavailable- added by rockdaboot (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)

    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-11-18 darnir Open/ClosedOpen => Closed
    2014-10-27 rockdaboot StatusNone => Fixed
    2014-08-09 None Attached File- => Added really-fix-css.diff, #31879
    2014-08-09 None Attached File- => Added fix-css.diff, #31878

    Back to the top

    Powered by Savane 3.3