{"record":{"id":"1b635a540847ac8b","repo":"sqlmapproject/sqlmap","slug":"truncated-dns-label","errorCode":null,"errorMessage":"truncated DNS label","messagePattern":"truncated DNS label","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"extra/kerberos/discovery.py","lineNumber":125,"sourceCode":"    while True:\n        if offset >= len(data):\n            raise ValueError(\"truncated DNS name\")\n        length = data[offset]\n        if length == 0:\n            offset += 1\n            break\n        if length & 0xc0 == 0xc0:                          # follow compression pointer (bounded, cycle-safe)\n            if offset + 2 > len(data):\n                raise ValueError(\"truncated DNS pointer\")\n            jumps += 1\n            if jumps > _MAX_NAME_JUMPS:\n                raise ValueError(\"too many DNS compression jumps\")\n            if end is None:\n                end = offset + 2\n            offset = ((length & 0x3f) << 8) | data[offset + 1]\n            continue\n        if offset + 1 + length > len(data):\n            raise ValueError(\"truncated DNS label\")\n        labels.append(bytes(data[offset + 1:offset + 1 + length]).decode(\"ascii\", \"replace\"))\n        offset += 1 + length\n    return \".\".join(labels), (end if end is not None else offset)\n\ndef parseSrv(response):\n    \"\"\"Parse SRV records from a (possibly hostile) DNS response into [(priority, weight, port,\n    target), ...]. Malformed input yields an empty list rather than raising.\"\"\"\n\n    data = bytearray(response)\n    if len(data) < 12:\n        return []\n    try:\n        qdcount, ancount = struct.unpack(\">HH\", bytes(data[4:8]))\n        offset = 12\n        for _ in range(qdcount):\n            offset = _skipName(data, offset) + 4           # + qtype/qclass\n        records = []\n        for _ in range(ancount):","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/extra/kerberos/discovery.py#L107-L143","documentation":"Error \"truncated DNS label\" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at extra/kerberos/discovery.py:125 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0a35b20e3953d341be6c7ac75ccb0b3362540c8d","analyzedAt":"2026-08-26T23:02:52.002Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}