summaryrefslogtreecommitdiff
path: root/src/input/input_smb.c
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2009-02-10 18:25:09 +0000
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2009-02-10 18:25:09 +0000
commit1c19b8e8e3cfb32e341332b751686e86d7389569 (patch)
tree64d9edcf312915b3d9ae524d55b6508b61bf361f /src/input/input_smb.c
parentc62b455944c8c91bd4d9ae5e8000ec33190174c5 (diff)
parent6002a9a87b3f591832c2b91ca1b2b1b67be008f5 (diff)
downloadxine-lib-1c19b8e8e3cfb32e341332b751686e86d7389569.tar.gz
xine-lib-1c19b8e8e3cfb32e341332b751686e86d7389569.tar.bz2
Merge from 1.1.
--HG-- rename : doc/faq/faq.sgml => doc/faq/faq.docbook rename : src/xine-engine/buffer.h => include/xine/buffer.h rename : src/xine-engine/xine_internal.h => include/xine/xine_internal.h
Diffstat (limited to 'src/input/input_smb.c')
-rw-r--r--src/input/input_smb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/input/input_smb.c b/src/input/input_smb.c
index b7c864f50..3c2086cc3 100644
--- a/src/input/input_smb.c
+++ b/src/input/input_smb.c
@@ -92,7 +92,9 @@ smb_plugin_read_block (input_plugin_t *this_gen, fifo_buffer_t *fifo,
off_t total_bytes;
buf_element_t *buf = fifo->buffer_pool_alloc (fifo);
- if (todo < 0 || todo > buf->size) {
+ if (todo > buf->max_size)
+ todo = buf->max_size;
+ if (todo < 0) {
buf->free_buffer (buf);
return NULL;
}