sqlmapproject/sqlmap · error · ValueError
truncated DER length
Error message
truncated DER length
What it means
Error "truncated DER length" thrown in sqlmapproject/sqlmap.
Source
Thrown at extra/kerberos/der.py:110
# ---- decoding -------------------------------------------------------------------------------------
def peel(data, offset=0):
"""Parse one TLV at 'offset'; return (tag, content_bytearray, next_offset). Raises ValueError on
truncated or indefinite-length input (the data may come from the network, so fail predictably)."""
data = bytearray(data)
if offset + 2 > len(data):
raise ValueError("truncated DER header")
tag = data[offset]
first = data[offset + 1]
offset += 2
if first < 0x80:
length = first
elif first == 0x80:
raise ValueError("indefinite-length DER is not permitted")
else:
count = first & 0x7f
if offset + count > len(data):
raise ValueError("truncated DER length")
length = 0
for _ in range(count):
length = (length << 8) | data[offset]
offset += 1
if offset + length > len(data):
raise ValueError("truncated DER content")
return tag, data[offset:offset + length], offset + length
def children(content):
"""Iterate the TLVs contained in a constructed value; yields (tag, content_bytearray)."""
content = bytearray(content)
offset = 0
out = []
while offset < len(content):
tag, inner, offset = peel(content, offset)
out.append((tag, inner))
return outView on GitHub (pinned to 0a35b20e39)
When it happens
Trigger: Thrown at extra/kerberos/der.py:110 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/f70216aa0377a069.
Report an issue: GitHub.