Merge branch 'backport-1632-fileutils-large-write-glib-2-64' into 'glib-2-64'

Backport !1632 Fix large writes in gfileutils to glib-2-64

See merge request GNOME/glib!1633
This commit is contained in:
Sebastian Dröge 2020-09-03 09:33:46 +00:00
commit fba920af8f

View File

@ -1089,7 +1089,7 @@ write_to_temp_file (const gchar *contents,
{
gssize s;
s = write (fd, contents, length);
s = write (fd, contents, MIN (length, G_MAXSSIZE));
if (s < 0)
{
@ -1106,7 +1106,7 @@ write_to_temp_file (const gchar *contents,
goto out;
}
g_assert (s <= length);
g_assert ((gsize) s <= length);
contents += s;
length -= s;