This is an excerpt of the latest version of icoutils (0.29.1). More specifically out of the wrestool/main.c file. This C-Code will be run for every file you pass as an argument to wrestool:
/* get file size */ fi.name = argv[c]; fi.total_size = file_size(fi.name);
[...]
/* open file */ fi.file = fopen(fi.name, "rb");
[...]
/* read all of file */ fi.memory = xmalloc(fi.total_size);
if (fread(fi.memory, fi.total_size, 1, fi.file) != 1)
As promised, it will try to read ALL of the file into memory. Doing this with large self-extracting archives for example is a no-go.
This is an excerpt of the latest version of icoutils (0.29.1). More specifically out of the wrestool/main.c file. This C-Code will be run for every file you pass as an argument to wrestool:
/* get file size */
fi.name = argv[c];
fi.total_ size = file_size(fi.name);
fi.file = fopen(fi.name, "rb");
fi.memory = xmalloc( fi.total_ size);
[...]
/* open file */
[...]
/* read all of file */
if (fread(fi.memory, fi.total_size, 1, fi.file) != 1)
As promised, it will try to read ALL of the file into memory. Doing this with large self-extracting archives for example is a no-go.