File gnome-vfs2-smb-bufsize.patch of Package gnome-vfs2

--- gnome-vfs-2.15.90/modules/smb-method.c
+++ gnome-vfs-2.15.90/modules/smb-method.c
@@ -1944,7 +1944,7 @@
 		
 		/* Important: perform_authentication leaves and re-enters the lock! */
 		while (perform_authentication (&actx) > 0) {
-			n = smb_context->read (smb_context, handle->file, buffer, num_bytes);
+			n = smb_context->read (smb_context, handle->file, buffer, MIN (USHRT_MAX, num_bytes));
 			actx.res = (n >= 0) ? GNOME_VFS_OK : gnome_vfs_result_from_errno ();
 		}