Simple patch to fix the overflow found in atftpd by Rick Patel.
056d61425e87567ddcedc6188e7b99fa--- tftpd_file.c Tue Mar 12 05:26:18 2002
+++ tftpd_file_diff.c Thu Jun 5 20:31:06 2003
@@ -357,7 +357,8 @@
else
{
strcpy(filename, directory);
- strncat(filename, data->tftp_options[OPT_FILENAME].value, VAL_SIZE);
+ strncat(filename, data->tftp_options[OPT_FILENAME].value,
+ VAL_SIZE - strlen( directory ) - 1 );
}
/* If the filename contain /../ sequences, we forbid the access */
Comments
No comments yet, be the first!