Commit 50e24ff7 for guacamole.apache.org
commit 50e24ff76d3f2e9367a5f2cc52ddaa4c717ed967
Author: Ben Jefferies <ben.jefferies@prolific.com>
Date: Wed Sep 9 16:17:14 2026 +0100
GUACAMOLE-2327: Use 64-bit types for RDP drive allocation-unit counts
RDPDR FileFsSizeInformation writes allocation-unit counts as UINT64,
but guac_rdp_fs_info stored them in a 32-bit int. Filesystems with
more than 2^31 allocation units then overflow, which can make Windows
report zero free space and refuse copies onto the redirected drive.
Related: GUACAMOLE-268, GUACAMOLE-764.
Co-authored-by: Cursor <cursoragent@cursor.com>
diff --git a/src/protocols/rdp/fs.h b/src/protocols/rdp/fs.h
index eb88ba3e..d26fcf55 100644
--- a/src/protocols/rdp/fs.h
+++ b/src/protocols/rdp/fs.h
@@ -231,13 +231,21 @@ typedef struct guac_rdp_fs_info {
/**
* The number of free blocks available.
+ *
+ * 64-bit to match the UINT64 allocation-unit counts used by RDPDR
+ * FileFsSizeInformation / FileFsFullSizeInformation. A 32-bit int
+ * overflows once the backing filesystem reports more than 2^31
+ * allocation units, which can make Windows report zero free space
+ * and refuse copies onto the redirected drive.
*/
- int blocks_available;
+ uint64_t blocks_available;
/**
* The number of blocks in the filesystem.
+ *
+ * 64-bit for the same reason as blocks_available.
*/
- int blocks_total;
+ uint64_t blocks_total;
/**
* The number of bytes per block.