--- afd-1.3.6/src/common/get_rename_rules.c.old 2007-05-17 11:10:56.000000000 +0200 +++ afd-1.3.6/src/common/get_rename_rules.c 2008-02-17 17:50:02.000000000 +0100 @@ -190,7 +190,7 @@ system_log(DEBUG_SIGN, __FILE__, __LINE__, "close() error : %s", strerror(errno)); } - buffer[stat_buf.st_size] = '\0'; + buffer[1 + stat_buf.st_size] = '\0'; /* * Now that we have the contents in the buffer lets first see