After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 739428 - webdav should use g_try_realloc
webdav should use g_try_realloc
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: webdav backend
1.23.x
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2014-10-30 22:24 UTC by Ross Lagerwall
Modified: 2014-11-04 21:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dav: Use g_try_realloc for output streams (1.73 KB, patch)
2014-10-30 22:31 UTC, Ross Lagerwall
accepted-commit_now Details | Review

Description Ross Lagerwall 2014-10-30 22:24:19 UTC
The webdav backend should use g_try_realloc to prevent aborts with large output streams.
Comment 1 Ross Lagerwall 2014-10-30 22:31:40 UTC
Created attachment 289699 [details] [review]
dav: Use g_try_realloc for output streams

When writing a large amount to a GMemoryOutputStream, the reallocation
function can fail.  Use g_try_realloc so that failures generate
G_IO_ERROR_NO_SPACE rather than abort the process (as happens with
g_realloc).
Comment 2 Ondrej Holy 2014-10-31 08:49:04 UTC
Review of attachment 289699 [details] [review]:

It looks pretty good, thanks!
Comment 3 Ross Lagerwall 2014-11-04 21:59:55 UTC
Pushed to master as 50bb750fe9bcae0d333a1ec40a5d161ab6ba1741. Thanks for the review!