Package: recode
Version: 3.6-23
Followup-For: Bug #754945
Another possible solution would be dinamically allocate buffer for
output_name. Please see patch attached.
--- a/src/main.c
+++ b/src/main.c
@@ -847,12 +847,13 @@
for (; optind < argc; optind++)
{
const char *input_name;
- char output_name[200]; /* FIXME: dangerous limit */
+ char *output_name;
FILE *file;
struct stat file_stat;
struct utimbuf file_utime;
input_name = argv[optind];
+ output_name = xmalloc (strlen (input_name) + 17 + 1); /* 17 is up limit for rec%d.tmp where %d is pid_t */
/* Check if the file can be read and rewritten. */
@@ -965,6 +966,7 @@
unlink (output_name);
}
+ free (output_name);
}
}
else