sqlmapproject/sqlmap · error · InterfaceError
truncated DataRow
Error message
truncated DataRow
What it means
Error "truncated DataRow" thrown in sqlmapproject/sqlmap.
Source
Thrown at extra/dbwire/postgres.py:197
description, rows, rowcount, off = [], [], -1, 2
for _ in range(count):
end = payload.index(b"\x00", off)
name = payload[off:end].decode("utf-8", "replace")
off = end + 1
(typeoid,) = struct.unpack("!I", payload[off + 6:off + 10])
off += 18 # tableoid4 colno2 typeoid4 typelen2 typmod4 format2
description.append((name, typeoid, None, None, None, None, None))
elif mtype == b"D": # DataRow
(count,) = struct.unpack("!H", payload[:2])
off, row = 2, []
for col in range(count):
(vlen,) = struct.unpack("!i", payload[off:off + 4])
off += 4
if vlen == -1:
row.append(None)
else:
if off + vlen > len(payload):
raise InterfaceError("truncated DataRow")
raw = payload[off:off + vlen]
off += vlen
if description and col < len(description) and description[col][1] == _OID_BYTEA:
row.append(_decode_bytea(raw)) # bytes so sqlmap hex-encodes it (like the native driver)
else:
try:
row.append(raw.decode("utf-8"))
except UnicodeDecodeError:
row.append(raw) # non-UTF-8 (e.g. a SQL_ASCII db): keep bytes (hex-encoded), not lossy U+FFFD
rows.append(tuple(row))
elif mtype == b"C": # CommandComplete ("SELECT 3", "INSERT 0 1", ...)
tag = payload[:-1].decode("utf-8", "replace").split()
if tag and tag[-1].isdigit():
rowcount = int(tag[-1])
elif mtype == b"G": # CopyInResponse - server now waits for client CopyData; refuse to avoid a deadlock
_send(self._sock, b"f", b"COPY FROM STDIN is not supported\x00") # CopyFail
elif mtype == b"E": # ErrorResponse
error = _error_message(payload)View on GitHub (pinned to 0a35b20e39)
When it happens
Trigger: Thrown at extra/dbwire/postgres.py:197 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/0a3f3b6e45bd3a9b.
Report an issue: GitHub.