The code is completely mess, referring to incorrect buffers as it is
calculating the size of the buffer. This wouldn't be problem as both
buffers are same length, but for some reason the code is also using
strlen() for something.
Fix up the mess.
Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
pr_info("Drawing image %s\n", image->image_filename);
tmpfile[0] = 0;
- strncat(tmpfile, image->image_filename, sizeof(tmp) - strlen(tmp) - 1);
- strncat(tmpfile, ".tmp", sizeof(tmp) - strlen(tmp) - 1);
+ tmp[0] = 0;
+ strncat(tmpfile, image->image_filename, sizeof(tmpfile) - 1);
+ strncat(tmpfile, ".tmp", sizeof(tmpfile) - 1);
if (image->updatestr)
updatestr = image->updatestr;