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 8e6de1fb5f)"
This commit is contained in:
Ángel González 2014-10-22 01:10:21 +02:00 committed by Giuseppe Scrivano
parent bc347cc36f
commit 601b282cd8
4 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2013-10-22 Ángel González <keisial@gmail.com>
* bootstrap.conf (gnulib_modules): Add module xstrndup.
2014-09-25 Tim Ruehsen <tim.ruehsen@gmx.de>
* configure.ac: removed WgetTest.pm.in

View File

@ -78,6 +78,7 @@ update-copyright
vasprintf
vsnprintf
write
xstrndup
"
gnulib_extra_files="

View File

@ -1,3 +1,7 @@
2013-10-22 Ángel González <keisial@gmail.com>
* css-url.c (get_uri_string): Honor the specified length argument.
2014-10-16 Tim Ruehsen <tim.ruehsen@gmx.de>
* url.c (url_parse): little code cleanup

View File

@ -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