{"record":{"id":"3bfc005f9c25c874","repo":"sqlmapproject/sqlmap","slug":"cas-response-too-short-wanted-d-of-d-bytes","errorCode":null,"errorMessage":"CAS response too short (wanted %d of %d bytes)","messagePattern":"CAS response too short \\(wanted (.+?) of (.+?) bytes\\)","errorType":"exception","errorClass":"InterfaceError","httpStatus":null,"severity":"error","filePath":"extra/dbwire/cubrid.py","lineNumber":140,"sourceCode":"        v = struct.unpack_from(\">h\", self._buf, self._off)[0]; self._off += 2; return v\n\n    def int(self):\n        v = struct.unpack_from(\">i\", self._buf, self._off)[0]; self._off += 4; return v\n\n    def long(self):\n        v = struct.unpack_from(\">q\", self._buf, self._off)[0]; self._off += 8; return v\n\n    def float(self):\n        v = struct.unpack_from(\">f\", self._buf, self._off)[0]; self._off += 4; return v\n\n    def double(self):\n        v = struct.unpack_from(\">d\", self._buf, self._off)[0]; self._off += 8; return v\n\n    def raw(self, n):\n        # a slice past the end returns short data *silently*, which would hand a truncated value to the\n        # caller (the fixed-width readers above raise struct.error instead)\n        if n < 0 or n > self.remaining():\n            raise InterfaceError(\"CAS response too short (wanted %d of %d bytes)\" % (n, self.remaining()))\n        v = self._buf[self._off:self._off + n]; self._off += n; return bytes(v)\n\n    def skip(self, n):\n        self._off += n\n\n    def nts(self, n):  # n bytes, drop one trailing NUL if present\n        b = self.raw(n)\n        if b and bytearray(b)[-1:] == bytearray(b\"\\x00\"):\n            b = b[:-1]\n        return b\n\ndef _decode_text(raw):\n    try:\n        return raw.decode(\"utf-8\")\n    except UnicodeDecodeError:\n        return raw  # non-UTF-8 -> keep bytes (sqlmap hex-encodes), not lossy\n\ndef _decode_value(reader, col_type, size):","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/extra/dbwire/cubrid.py#L122-L158","documentation":"Error \"CAS response too short (wanted %d of %d bytes)\" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at extra/dbwire/cubrid.py:140 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"}