🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

dns-packet

Package Overview
Dependencies
Maintainers
2
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dns-packet - npm Package Compare versions

Comparing version

to
5.2.3

11

index.js

@@ -80,3 +80,3 @@ 'use strict'

name.encodingLength = function (n) {
if (n === '.') return 1
if (n === '.' || n === '..') return 1
return Buffer.byteLength(n.replace(/^\.|\.$/gm, '')) + 2

@@ -1446,3 +1446,5 @@ }

exports.encode = function (result, buf, offset) {
if (!buf) buf = Buffer.allocUnsafe(exports.encodingLength(result))
const allocing = !buf
if (allocing) buf = Buffer.allocUnsafe(exports.encodingLength(result))
if (!offset) offset = 0

@@ -1467,2 +1469,7 @@

// just a quick sanity check
if (allocing && exports.encode.bytes !== buf.length) {
return buf.slice(0, exports.encode.bytes)
}
return buf

@@ -1469,0 +1476,0 @@ }

2

package.json
{
"name": "dns-packet",
"version": "5.2.2",
"version": "5.2.3",
"description": "An abstract-encoding compliant module for encoding / decoding DNS packets",

@@ -5,0 +5,0 @@ "author": "Mathias Buus",