tjfontaine/node-dns — Issue #13: "Trying to read beyond buffer length"
Author: abh
Created: 2012-02-28 08:58:10+00:00
State: open

I'm using the new request code now; after a couple minutes of running (so maybe about a thousand requests) the process crashed with the following (the first line is my debug output that it parsed a text record):

```
got txt record from 212.117.177.118 : {"qs":10808387,"v":"212.117.177.118, v1.41","id":"212.117.177.118","up":102935}

assert.js:104
throw new assert.AssertionError({
^
AssertionError: Trying to read beyond buffer length
at readUInt16 (buffer.js:574:12)
at Buffer.readUInt16BE (buffer.js:594:10)
at Object.unpack (/Users/ask/src/pgeodns/monitor/node_modules/native-dns/lib/fields.js:62:28)
at /Users/ask/src/pgeodns/monitor/node_modules/native-dns/lib/message.js:65:19
at Array.forEach (native)
at [object Object].unpackFields (/Users/ask/src/pgeodns/monitor/node_modules/native-dns/lib/message.js:57:10)
at [object Object].unpack (/Users/ask/src/pgeodns/monitor/node_modules/native-dns/lib/message.js:45:14)
at [object Object].unpack (/Users/ask/src/pgeodns/monitor/node_modules/native-dns/lib/packet.js:124:22)
at [object Object].handleMessage (/Users/ask/src/pgeodns/monitor/node_modules/native-dns/lib/pending.js:60:10)
at Socket. (/Users/ask/src/pgeodns/monitor/node_modules/native-dns/lib/socket_cache.js:124:20)
```