Problem: Calling system() with empty input gives an error for writing the
temp file.
Solution: Do not try writing if the string length is zero. (Olaf Dabrunz)
}
else
{
+ size_t len;
+
p = get_tv_string_buf_chk(&argvars[1], buf);
if (p == NULL)
{
fclose(fd);
goto errret; /* type error; errmsg already given */
}
- if (fwrite(p, STRLEN(p), 1, fd) != 1)
+ len = STRLEN(p);
+ if (len > 0 && fwrite(p, len, 1, fd) != 1)
err = TRUE;
}
if (fclose(fd) != 0)
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 451,
/**/
450,
/**/