[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: |
Wed, 22 Oct 2014 20:28:57 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Tim Rühsen <address@hidden> writes:
> Am Mittwoch, 22. Oktober 2014, 01:20:17 schrieb Ángel González:
>> On 21/10/14 09:50, Giuseppe Scrivano wrote:
>> > Ángel,
>> > 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
>>
>> The revert to the old behavior was only intended for checking it was the
>> right place. We have xstrndup() to do just what we want. Please test.
>>
>> Regards
>
> Hi Ángel,
>
> + return xstrndup (uri, at + *pos, *length);;
>
> Shouldn't it be
>
> + return xstrndup (at + *pos, *length);
yes...
Angel, if you are ok with, I can push this version (I've done added the
gnulib module and changed a bit the changelog entry):
Regards,
Giuseppe
>From 601b282cd8e7b2783f818469f55923e91cc4e1a8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=81ngel=20Gonz=C3=A1lez?= <address@hidden>
Date: Wed, 22 Oct 2014 01:10:21 +0200
Subject: [PATCH] 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)"
---
ChangeLog | 4 ++++
bootstrap.conf | 1 +
src/ChangeLog | 4 ++++
src/css-url.c | 3 ++-
4 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index d1b755a..eca59da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-22 Ángel González <address@hidden>
+
+ * bootstrap.conf (gnulib_modules): Add module xstrndup.
+
2014-09-25 Tim Ruehsen <address@hidden>
* configure.ac: removed WgetTest.pm.in
diff --git a/bootstrap.conf b/bootstrap.conf
index bbfb38f..11f5f92 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -78,6 +78,7 @@ update-copyright
vasprintf
vsnprintf
write
+xstrndup
"
gnulib_extra_files="
diff --git a/src/ChangeLog b/src/ChangeLog
index d5aeca0..bdc6844 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-22 Ángel González <address@hidden>
+
+ * css-url.c (get_uri_string): Honor the specified length argument.
+
2014-10-16 Tim Ruehsen <address@hidden>
* url.c (url_parse): little code cleanup
diff --git a/src/css-url.c b/src/css-url.c
index c605798..8ee4e8c 100644
--- a/src/css-url.c
+++ b/src/css-url.c
@@ -52,6 +52,7 @@ as that of the covered work. */
#include "html-url.h"
#include "css-tokens.h"
#include "css-url.h"
+#include "xstrndup.h"
/* from lex.yy.c */
extern char *yytext;
@@ -97,7 +98,7 @@ get_uri_string (const char *at, int *pos, int *length)
*length -= 2;
}
- return xstrdup (at + *pos);
+ return xstrndup (at + *pos, *length);
}
void
--
1.9.3
- [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, 2014/10/21
- 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 <=
- 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
- Re: [Bug-wget] Regression in git master branch (commit 8e6de1fb5ff0ca0c749da7db634a1b1e3a1215a2), Gabriel Somlo, 2014/10/22