mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-02 22:03:07 +02:00
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:
commit
fba920af8f
@ -1089,7 +1089,7 @@ write_to_temp_file (const gchar *contents,
|
|||||||
{
|
{
|
||||||
gssize s;
|
gssize s;
|
||||||
|
|
||||||
s = write (fd, contents, length);
|
s = write (fd, contents, MIN (length, G_MAXSSIZE));
|
||||||
|
|
||||||
if (s < 0)
|
if (s < 0)
|
||||||
{
|
{
|
||||||
@ -1106,7 +1106,7 @@ write_to_temp_file (const gchar *contents,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_assert (s <= length);
|
g_assert ((gsize) s <= length);
|
||||||
|
|
||||||
contents += s;
|
contents += s;
|
||||||
length -= s;
|
length -= s;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user