dns: use length for building TXT string · nodejs/node@f37450f · GitHub
Skip to content

Commit f37450f

Browse files
committed
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: #30688 PR-URL: #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>
1 parent 099d3fd commit f37450f

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/cares_wrap.cc

Lines changed: 2 additions & 1 deletion

test/parallel/test-dns-resolveany.js

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)