sqlmapproject/sqlmap · error · InterfaceError

malformed ROWFMT token (%d columns did not fill %d bytes)

Error message

malformed ROWFMT token (%d columns did not fill %d bytes)

What it means

Error "malformed ROWFMT token (%d columns did not fill %d bytes)" thrown in sqlmapproject/sqlmap.

Source

Thrown at extra/dbwire/sybase.py:180

        off += 1                                        # status (nullability - the value length says it)
        col.usertype = _i32(data, off); off += 4
        col.type = _u8(data, off); off += 1
        col.size, col.scale = _FIXED_LENGTH.get(col.type, 0), 0
        if col.type in _DECIMAL_TYPES:
            col.size = _u8(data, off)
            col.scale = _u8(data, off + 2)              # precision (off + 1) is not needed to decode
            off += 3
        elif col.type in _BLOB_TYPES:
            col.size = _i32(data, off); off += 4
            off += 2 + _u16(data, off)                  # the blob's table name
        elif col.type in _LONG_TYPES:
            col.size = _i32(data, off); off += 4
        elif col.type not in _FIXED_LENGTH:
            col.size = _u8(data, off); off += 1
        off += 1 + _u8(data, off)                       # locale
        columns.append(col)
    if off != end:
        raise InterfaceError("malformed ROWFMT token (%d columns did not fill %d bytes)" % (count, length))
    return columns, off

def _decode_numeric(raw, scale):
    # sign byte then a BIG-endian magnitude, and 1 means NEGATIVE (the Microsoft encoding is the mirror
    # image of this: little-endian, 1 == positive)
    magnitude = 0
    for b in bytearray(raw[1:]):
        magnitude = (magnitude << 8) | b
    value = -magnitude if bytearray(raw)[0] else magnitude
    if scale:
        text = "%0*d" % (scale + 1, abs(value))
        return ("-" if value < 0 else "") + text[:-scale] + "." + text[-scale:]
    return "%d" % value

def _decode_date(raw):
    import datetime
    return "%s" % (datetime.date(1900, 1, 1) + datetime.timedelta(days=_i32(raw, 0)))

View on GitHub (pinned to 0a35b20e39)

When it happens

Trigger: Thrown at extra/dbwire/sybase.py:180 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


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