The attached patch fixes a potential problem in folder_format_str() where a fixed buffer might not be null terminated. From Vikas.