1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00
* sysdeps/generic/glob.c (glob): Handle GLOB_BRACE and escaping
	correctly.
	* posix/globtest.sh: Add tests for GLOB_BRACE and escaping.
This commit is contained in:
Ulrich Drepper
2003-10-26 20:47:33 +00:00
parent 5ae19a5023
commit 98d2ca3d87
4 changed files with 186 additions and 68 deletions

View File

@ -195,12 +195,6 @@ ns_name_pton(const char *src, u_char *dst, size_t dstsiz) {
it internally. */
*label = 0x41;
label = bp++;
/* Another simplification: always assume
128 bit number. */
if (bp + 16 >= eom) {
__set_errno (EMSGSIZE);
return (-1);
}
++src;
while (isxdigit (*src)) {
n = *src > '9' ? *src - 'a' + 10 : *src - '0';
@ -211,6 +205,10 @@ ns_name_pton(const char *src, u_char *dst, size_t dstsiz) {
}
n <<= 4;
n += *src > '9' ? *src - 'a' + 10 : *src - '0';
if (bp + 1 >= eom) {
__set_errno (EMSGSIZE);
return (-1);
}
*bp++ = n;
++src;
}