[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] Regression in git master branch (commit 8e6de1fb5ff0ca0c7
From: |
Giuseppe Scrivano |
Subject: |
Re: [Bug-wget] Regression in git master branch (commit 8e6de1fb5ff0ca0c749da7db634a1b1e3a1215a2) |
Date: |
Tue, 21 Oct 2014 09:50:16 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Ángel,
Ángel González <address@hidden> writes:
> After a quick look, get_uri_string seems to not be taking into account
> the end of the url() parameter (it was before 8e6de1fb5).
> Can you check if this patch fixes the issue?
>
> diff --git a/src/css-url.c b/src/css-url.c
> index c605798..34a20af 100644
> --- a/src/css-url.c
> +++ b/src/css-url.c
> @@ -72,6 +72,8 @@ extern int yylex (void);
> static char *
> get_uri_string (const char *at, int *pos, int *length)
> {
> + char *uri;
> +
> if (0 != strncasecmp (at + *pos, "url(", 4))
> return NULL;
>
> @@ -97,7 +99,14 @@ get_uri_string (const char *at, int *pos, int *length)
> *length -= 2;
> }
>
> - return xstrdup (at + *pos);
> + uri = xmalloc (*length + 1);
> + if (uri)
> + {
> + strncpy (uri, at + *pos, *length);
> + uri[*length] = '\0';
> + }
> +
> + return uri;
> }
>
> void
thanks for the debugging effort! Would you mind to send a separate
patch that doesn't use strncpy (so to make make dist-check happy),
probably we can just use memcpy here.
Regards,
Giuseppe
- [Bug-wget] Regression in git master branch (commit 8e6de1fb5ff0ca0c749da7db634a1b1e3a1215a2), Gabriel Somlo, 2014/10/20
- Re: [Bug-wget] Regression in git master branch (commit 8e6de1fb5ff0ca0c749da7db634a1b1e3a1215a2), Ángel González, 2014/10/20
- Re: [Bug-wget] Regression in git master branch (commit 8e6de1fb5ff0ca0c749da7db634a1b1e3a1215a2), Gabriel Somlo, 2014/10/20
- Re: [Bug-wget] Regression in git master branch (commit 8e6de1fb5ff0ca0c749da7db634a1b1e3a1215a2),
Giuseppe Scrivano <=
- Re: [Bug-wget] Regression in git master branch (commit 8e6de1fb5ff0ca0c749da7db634a1b1e3a1215a2), Ángel González, 2014/10/21
- Re: [Bug-wget] Regression in git master branch (commit 8e6de1fb5ff0ca0c749da7db634a1b1e3a1215a2), Gabriel Somlo, 2014/10/21
- Re: [Bug-wget] Regression in git master branch (commit 8e6de1fb5ff0ca0c749da7db634a1b1e3a1215a2), Giuseppe Scrivano, 2014/10/22
- Re: [Bug-wget] Regression in git master branch (commit 8e6de1fb5ff0ca0c749da7db634a1b1e3a1215a2), Tim Rühsen, 2014/10/22
- Re: [Bug-wget] Regression in git master branch (commit 8e6de1fb5ff0ca0c749da7db634a1b1e3a1215a2), Giuseppe Scrivano, 2014/10/22
- Re: [Bug-wget] Regression in git master branch (commit 8e6de1fb5ff0ca0c749da7db634a1b1e3a1215a2), Ángel González, 2014/10/22
- Re: [Bug-wget] Regression in git master branch (commit 8e6de1fb5ff0ca0c749da7db634a1b1e3a1215a2), Giuseppe Scrivano, 2014/10/23
- Re: [Bug-wget] Regression in git master branch (commit 8e6de1fb5ff0ca0c749da7db634a1b1e3a1215a2), Tim Ruehsen, 2014/10/27
- Re: [Bug-wget] Regression in git master branch (commit 8e6de1fb5ff0ca0c749da7db634a1b1e3a1215a2), Tim Ruehsen, 2014/10/27
- Re: [Bug-wget] Regression in git master branch (commit 8e6de1fb5ff0ca0c749da7db634a1b1e3a1215a2), Giuseppe Scrivano, 2014/10/27