summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-30 23:44:29 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-30 23:44:29 +0100
commit0ad55ab631eaf2384c91856bbf7b19cca698e8f4 (patch)
tree5a1dffa85fe1a33e24d26b6fb68007345bdcb11d /plugins
parentc4a569f156223b4d5259bd5350049f0699e7a3c3 (diff)
prevent possible crash in vfs_curl
Diffstat (limited to 'plugins')
-rw-r--r--plugins/vfs_curl/vfs_curl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/vfs_curl/vfs_curl.c b/plugins/vfs_curl/vfs_curl.c
index 6efbedf8..2c683252 100644
--- a/plugins/vfs_curl/vfs_curl.c
+++ b/plugins/vfs_curl/vfs_curl.c
@@ -240,6 +240,11 @@ http_curl_write (void *ptr, size_t size, size_t nmemb, void *stream) {
}
}
+ if (avail < 0) {
+ trace ("vfs_curl: something bad happened in metadata parser. can't continue streaming.\n");
+ return 0;
+ }
+
if (avail) {
trace ("http_curl_write_wrapper [2] %d\n", avail);
size_t res = http_curl_write_wrapper (fp, ptr, avail);