summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-11-27 21:51:54 +0100
committerAnna Henningsen <anna@addaleax.net>2019-11-30 02:03:46 +0100
commit48cadcb7aa902ee1af01357a2cf340ae5bc60f87 (patch)
treec5be14fb4f897b34db57fcca03975f82a5dd1398 /test
parentf4f8ec2b65ea1e520c93ad0cee3d7241d113934d (diff)
downloadandroid-node-v8-48cadcb7aa902ee1af01357a2cf340ae5bc60f87.tar.gz
android-node-v8-48cadcb7aa902ee1af01357a2cf340ae5bc60f87.tar.bz2
android-node-v8-48cadcb7aa902ee1af01357a2cf340ae5bc60f87.zip
dns: use length for building TXT string
Rely on the length reported by C-Ares rather than `\0`-termination for creating the JS string for a dns TXT response. Fixes: https://github.com/nodejs/node/issues/30688 PR-URL: https://github.com/nodejs/node/pull/30690 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-dns-resolveany.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-dns-resolveany.js b/test/parallel/test-dns-resolveany.js
index bb15b1a38b..33beee847f 100644
--- a/test/parallel/test-dns-resolveany.js
+++ b/test/parallel/test-dns-resolveany.js
@@ -11,7 +11,7 @@ const answers = [
{ type: 'AAAA', address: '::42', ttl: 123 },
{ type: 'MX', priority: 42, exchange: 'foobar.com', ttl: 124 },
{ type: 'NS', value: 'foobar.org', ttl: 457 },
- { type: 'TXT', entries: [ 'v=spf1 ~all', 'xyz' ] },
+ { type: 'TXT', entries: [ 'v=spf1 ~all', 'xyz\0foo' ] },
{ type: 'PTR', value: 'baz.org', ttl: 987 },
{
type: 'SOA',