bug4(): suggested solution: always prepare enough memory for string handling
bug5(): suggested solution: always make sure string is null terminated