Product Documentation

V11.5 Release Notes

Previous Topic

Next Topic

Select c-treeDB functions improperly allowed fields larger than 65535 bytes

The c-treeDB function ctdbAddField takes a VRLEN (signed 4-byte integer) for FieldLength. This implies it will accept a value greater than the maximum stored in the DODA, which is 65535. Although no error was generated when this function was called with a length greater than 65535, the actual length stored in the DODA overflowed, resulting in unexpected behavior.

To prevent this, FieldLength checks have been added to the following functions:

  • ctdbAddField
  • ctdbAddVirtualField
  • ctdbInsField
  • ctdbInsFieldByName

These functions now return CTDBRET_ARGSMALL (4006) if the length is less than 0 and CTDBRET_TOOBIG (4043) if the length is greater than 65535.

TOCIndex