mirror of
https://github.com/mirror/wget.git
synced 2025-02-07 02:00:07 +08:00
[svn] Fix #20748: fix test usage wrt zero-termination of strings.
Also fixed incorrect "src/" prefix in ChangeLog entry for #20736.
This commit is contained in:
parent
e8c44c9ebc
commit
19f0a05e91
@ -1,6 +1,12 @@
|
|||||||
|
2007-08-10 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||||
|
|
||||||
|
* url.c (append_uri_pathel): Do not assume dest string to be
|
||||||
|
zero-terminated.
|
||||||
|
(test_append_uri_pathel): Terminate string to fix test failure.
|
||||||
|
|
||||||
2007-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
2007-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||||
|
|
||||||
* src/url.c (url_string): Use comparison, not assignment, in
|
* url.c (url_string): Use comparison, not assignment, in
|
||||||
check for auth_mode == URL_AUTH_HIDE_PASSWD.
|
check for auth_mode == URL_AUTH_HIDE_PASSWD.
|
||||||
|
|
||||||
2007-08-08 Micah Cowan <micah@cowan.name>
|
2007-08-08 Micah Cowan <micah@cowan.name>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* URL handling.
|
/* URL handling.
|
||||||
Copyright (C) 1996-2006 Free Software Foundation, Inc.
|
Copyright (C) 1996-2007 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Wget.
|
This file is part of GNU Wget.
|
||||||
|
|
||||||
@ -1369,7 +1369,7 @@ append_uri_pathel (const char *b, const char *e, bool escaped,
|
|||||||
|| opt.restrict_files_case == restrict_uppercase)
|
|| opt.restrict_files_case == restrict_uppercase)
|
||||||
{
|
{
|
||||||
char *q;
|
char *q;
|
||||||
for (q = TAIL (dest); *q; ++q)
|
for (q = TAIL (dest); q < TAIL (dest) + outlen; ++q)
|
||||||
{
|
{
|
||||||
if (opt.restrict_files_case == restrict_lowercase)
|
if (opt.restrict_files_case == restrict_lowercase)
|
||||||
*q = TOLOWER (*q);
|
*q = TOLOWER (*q);
|
||||||
@ -2089,6 +2089,7 @@ test_append_uri_pathel()
|
|||||||
|
|
||||||
append_string (test_array[i].original_url, &dest);
|
append_string (test_array[i].original_url, &dest);
|
||||||
append_uri_pathel (p, p + strlen(p), test_array[i].escaped, &dest);
|
append_uri_pathel (p, p + strlen(p), test_array[i].escaped, &dest);
|
||||||
|
append_char ('\0', &dest);
|
||||||
|
|
||||||
mu_assert ("test_append_uri_pathel: wrong result",
|
mu_assert ("test_append_uri_pathel: wrong result",
|
||||||
strcmp (dest.base, test_array[i].expected_result) == 0);
|
strcmp (dest.base, test_array[i].expected_result) == 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user