Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
dfefbd12
Commit
dfefbd12
authored
Jan 07, 2009
by
Francois Gouget
Committed by
Alexandre Julliard
Jan 07, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dnsapi: dns_ns_name_pton() is unused so remove it.
parent
cbe5d8e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
129 deletions
+0
-129
ns_name.c
dlls/dnsapi/ns_name.c
+0
-129
No files found.
dlls/dnsapi/ns_name.c
View file @
dfefbd12
...
...
@@ -140,135 +140,6 @@ dns_ns_name_ntop(const u_char *src, char *dst, size_t dstsiz) {
return
(
dn
-
dst
);
}
/*
* dns_ns_name_pton(src, dst, dstsiz)
* Convert a ascii string into an encoded domain name as per RFC1035.
* return:
* -1 if it fails
* 1 if string was fully qualified
* 0 is string was not fully qualified
* notes:
* Enforces label and domain length limits.
*/
int
dns_ns_name_pton
(
const
char
*
src
,
u_char
*
dst
,
size_t
dstsiz
)
{
u_char
*
label
,
*
bp
,
*
eom
;
int
c
,
n
,
escaped
;
char
*
cp
;
escaped
=
0
;
bp
=
dst
;
eom
=
dst
+
dstsiz
;
label
=
bp
++
;
while
((
c
=
*
src
++
)
!=
0
)
{
if
(
escaped
)
{
if
((
cp
=
strchr
(
digits
,
c
))
!=
NULL
)
{
n
=
(
cp
-
digits
)
*
100
;
if
((
c
=
*
src
++
)
==
0
||
(
cp
=
strchr
(
digits
,
c
))
==
NULL
)
{
return
(
-
1
);
}
n
+=
(
cp
-
digits
)
*
10
;
if
((
c
=
*
src
++
)
==
0
||
(
cp
=
strchr
(
digits
,
c
))
==
NULL
)
{
return
(
-
1
);
}
n
+=
(
cp
-
digits
);
if
(
n
>
255
)
{
return
(
-
1
);
}
c
=
n
;
}
else
if
(
c
==
'['
&&
label
==
bp
-
1
&&
*
src
==
'x'
)
{
/* Theoretically we would have to handle \[o
as well but we do not since we do not need
it internally. */
*
label
=
0x41
;
label
=
bp
++
;
++
src
;
while
(
isxdigit
(
*
src
))
{
n
=
*
src
>
'9'
?
*
src
-
'a'
+
10
:
*
src
-
'0'
;
++
src
;
if
(
!
isxdigit
(
*
src
))
{
return
(
-
1
);
}
n
<<=
4
;
n
+=
*
src
>
'9'
?
*
src
-
'a'
+
10
:
*
src
-
'0'
;
if
(
bp
+
1
>=
eom
)
{
return
(
-
1
);
}
*
bp
++
=
n
;
++
src
;
}
*
label
=
(
bp
-
label
-
1
)
*
8
;
if
(
*
src
++
!=
']'
||
*
src
++
!=
'.'
)
{
return
(
-
1
);
}
escaped
=
0
;
label
=
bp
++
;
if
(
bp
>=
eom
)
{
return
(
-
1
);
}
continue
;
}
escaped
=
0
;
}
else
if
(
c
==
'\\'
)
{
escaped
=
1
;
continue
;
}
else
if
(
c
==
'.'
)
{
c
=
(
bp
-
label
-
1
);
if
((
c
&
NS_CMPRSFLGS
)
!=
0
)
{
/* Label too big. */
return
(
-
1
);
}
if
(
label
>=
eom
)
{
return
(
-
1
);
}
*
label
=
c
;
/* Fully qualified ? */
if
(
*
src
==
'\0'
)
{
if
(
c
!=
0
)
{
if
(
bp
>=
eom
)
{
return
(
-
1
);
}
*
bp
++
=
'\0'
;
}
if
((
bp
-
dst
)
>
NS_MAXCDNAME
)
{
return
(
-
1
);
}
return
(
1
);
}
if
(
c
==
0
||
*
src
==
'.'
)
{
return
(
-
1
);
}
label
=
bp
++
;
continue
;
}
if
(
bp
>=
eom
)
{
return
(
-
1
);
}
*
bp
++
=
(
u_char
)
c
;
}
c
=
(
bp
-
label
-
1
);
if
((
c
&
NS_CMPRSFLGS
)
!=
0
)
{
/* Label too big. */
return
(
-
1
);
}
if
(
label
>=
eom
)
{
return
(
-
1
);
}
*
label
=
c
;
if
(
c
!=
0
)
{
if
(
bp
>=
eom
)
{
return
(
-
1
);
}
*
bp
++
=
0
;
}
if
((
bp
-
dst
)
>
NS_MAXCDNAME
)
{
/* src too big */
return
(
-
1
);
}
return
(
0
);
}
/*
* dns_ns_name_unpack(msg, eom, src, dst, dstsiz)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment