[baseformat] Fix handling of string when packing

The size used for packing the string was wrong because it used the
original string lenght rather than the encoded.
2 jobs for fix_baseformat_string_packing in 4 minutes and 10 seconds (queued for 1 second)