For whatever reason, "st_size" in "struct stat" is an off_t, which is a
signed integer. Negative sizes don't really make sense, so this cast
should be safe.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
/* Save the requested allocation size. */
if ((info == FILE_WAS_CREATED) || (info == FILE_WAS_OVERWRITTEN)) {
- if ((allocation_size > fsp->fsp_name->st.st_ex_size)
+ if ((allocation_size > (uint64_t)fsp->fsp_name->st.st_ex_size)
&& !(fsp->is_directory))
{
fsp->initial_allocation_size = smb_roundup(