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
0cc49f36
Commit
0cc49f36
authored
Jun 01, 2023
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Sep 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dnsapi: Set correct wDataLength for DNS_TYPE_SRV records.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
parent
a36e0a16
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
record.c
dlls/dnsapi/record.c
+4
-0
record.c
dlls/dnsapi/tests/record.c
+0
-2
No files found.
dlls/dnsapi/record.c
View file @
0cc49f36
...
...
@@ -1046,6 +1046,10 @@ static DNS_STATUS extract_rdata( const BYTE *base, const BYTE *end, const BYTE *
if
(
!
get_name
(
base
,
end
,
pos
,
name
))
return
DNS_ERROR_BAD_PACKET
;
if
(
!
(
r
->
Data
.
SRV
.
pNameTarget
=
strdupX
(
name
,
in
,
out
)))
return
ERROR_NOT_ENOUGH_MEMORY
;
r
->
wDataLength
=
sizeof
(
DNS_SRV_DATAA
);
if
(
out
==
DnsCharSetUnicode
)
r
->
wDataLength
+=
(
wcslen
(
(
const
WCHAR
*
)
r
->
Data
.
SRV
.
pNameTarget
)
+
1
)
*
sizeof
(
WCHAR
);
else
r
->
wDataLength
+=
strlen
(
r
->
Data
.
SRV
.
pNameTarget
)
+
1
;
break
;
case
DNS_TYPE_HINFO
:
...
...
dlls/dnsapi/tests/record.c
View file @
0cc49f36
...
...
@@ -230,7 +230,6 @@ static void test_DnsExtractRecordsFromMessage(void)
ok
(
rec
->
Flags
.
S
.
Section
==
DnsSectionAnswer
,
"wrong section %u
\n
"
,
rec
->
Flags
.
S
.
Section
);
ok
(
rec
->
Flags
.
S
.
CharSet
==
DnsCharSetUtf8
,
"wrong charset %u
\n
"
,
rec
->
Flags
.
S
.
CharSet
);
ok
(
rec
->
wType
==
DNS_TYPE_SRV
,
"wrong type %u
\n
"
,
rec
->
wType
);
todo_wine
ok
(
rec
->
wDataLength
==
sizeof
(
DNS_SRV_DATAA
)
+
strlen
(
"dc.winehq.org"
)
+
1
,
"wrong len %u
\n
"
,
rec
->
wDataLength
);
ok
(
rec
->
dwTtl
==
0x04050607
,
"wrong ttl %#lx
\n
"
,
rec
->
dwTtl
);
ok
(
!
strcmp
(
rec
->
Data
.
SRV
.
pNameTarget
,
"dc.winehq.org"
),
"wrong target %s
\n
"
,
rec
->
Data
.
SRV
.
pNameTarget
);
...
...
@@ -250,7 +249,6 @@ static void test_DnsExtractRecordsFromMessage(void)
ok
(
rec
->
Flags
.
S
.
Section
==
DnsSectionAnswer
,
"wrong section %u
\n
"
,
rec
->
Flags
.
S
.
Section
);
ok
(
rec
->
Flags
.
S
.
CharSet
==
DnsCharSetUtf8
,
"wrong charset %u
\n
"
,
rec
->
Flags
.
S
.
CharSet
);
ok
(
rec
->
wType
==
DNS_TYPE_SRV
,
"wrong type %u
\n
"
,
rec
->
wType
);
todo_wine
ok
(
rec
->
wDataLength
==
sizeof
(
DNS_SRV_DATAA
)
+
strlen
(
"dc.winehq.org"
)
+
1
,
"wrong len %u
\n
"
,
rec
->
wDataLength
);
ok
(
rec
->
dwTtl
==
0x04050607
,
"wrong ttl %#lx
\n
"
,
rec
->
dwTtl
);
ok
(
!
strcmp
(
rec
->
Data
.
SRV
.
pNameTarget
,
"dc.winehq.org"
),
"wrong target %s
\n
"
,
rec
->
Data
.
SRV
.
pNameTarget
);
...
...
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