1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3:registry: Use correct integer sizes

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
Andreas Schneider 2024-06-26 14:32:41 +02:00 committed by Andreas Schneider
parent 6cadb1d695
commit 8abda0a134

View File

@ -115,7 +115,7 @@ static int write_block( REGF_FILE *file, prs_struct *ps, uint32_t offset )
static int read_block( REGF_FILE *file, prs_struct *ps, uint32_t file_offset, uint32_t block_size )
{
int bytes_read, returned;
ssize_t bytes_read, returned;
char *buffer;
SMB_STRUCT_STAT sbuf;
@ -182,7 +182,7 @@ static int read_block( REGF_FILE *file, prs_struct *ps, uint32_t file_offset, ui
return False;
}
if (returned < 0 || bytes_read > INT_MAX - returned) {
if (returned < 0 || bytes_read > SSIZE_MAX - returned) {
DBG_ERR("Integer overflow\n");
return false;
}