c-treeACE SQL could unexpectedly terminate with an unhandled exception when reading a record from a table that was imported into a c-treeACE SQL database and whose DODA and SQL dictionary field definitions do not match. While not a normal occurrence, this condition could occur if a user modified the attributes of an imported table outside of c-treeACE SQL. An internal function allocated a buffer whose size is the maximum field length plus 1, however, it passed the field length that was read from the DODA resource. If the DODA field length exceeds the allocated buffer size, it was possible to write past the end of the allocated buffer. To avoid this, if the allocated buffer length is smaller than the DODA field length, the full allocated buffer length is now passed.