added string boundary checks with tests

it was possible to put strings in a plc DB that where too big, potentially overwriting other data.