sqlmapproject/sqlmap · error · ValueError

truncated DNS pointer

Error message

truncated DNS pointer

What it means

Error "truncated DNS pointer" thrown in sqlmapproject/sqlmap.

Source

Thrown at extra/kerberos/discovery.py:99

    out = bytearray()
    for label in name.split("."):
        out.append(len(label))
        out += label.encode("ascii")
    out.append(0)
    return bytes(out)

_MAX_NAME_JUMPS = 64                                       # guards against compression-pointer cycles

def _skipName(data, offset):
    while True:
        if offset >= len(data):
            raise ValueError("truncated DNS name")
        length = data[offset]
        if length == 0:
            return offset + 1
        if length & 0xc0 == 0xc0:                          # compression pointer ends the name
            if offset + 2 > len(data):
                raise ValueError("truncated DNS pointer")
            return offset + 2
        offset += 1 + length

def _readName(data, offset):
    labels = []
    end = None
    jumps = 0
    while True:
        if offset >= len(data):
            raise ValueError("truncated DNS name")
        length = data[offset]
        if length == 0:
            offset += 1
            break
        if length & 0xc0 == 0xc0:                          # follow compression pointer (bounded, cycle-safe)
            if offset + 2 > len(data):
                raise ValueError("truncated DNS pointer")
            jumps += 1

View on GitHub (pinned to 0a35b20e39)

When it happens

Trigger: Thrown at extra/kerberos/discovery.py:99 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of sqlmapproject/sqlmap@0a35b20e39 (2026-08-26). Data as JSON: /api/errors/42774076a3e7376f. Report an issue: GitHub.