[Fix] avoid strcat out of memory

avoid out of memory