diff options
author | Volker Lendecke <vl@sernet.de> | 2008-09-01 13:46:27 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-09-01 13:51:11 +0200 |
commit | 227718cd1a2143cd3c9585fc76f335ec7b5a24a5 (patch) | |
tree | 3480e808344755ec7b0c556bf70fa63c6fe8d217 /source3/smbd | |
parent | 9554f39b1245408e19bba4bda83f280020a49657 (diff) | |
download | samba-227718cd1a2143cd3c9585fc76f335ec7b5a24a5.tar.gz samba-227718cd1a2143cd3c9585fc76f335ec7b5a24a5.tar.bz2 samba-227718cd1a2143cd3c9585fc76f335ec7b5a24a5.zip |
Fix Coverity ID 587
The following test program prints "8" on 64-bit :-)
static void print_size(const char lenbuf[4])
{
printf("sizeof(lenbuf) = %d\n", (int)sizeof(lenbuf));
}
int main(void)
{
const char lenbuf[4];
print_size(lenbuf);
return 0;
}
Jeremy, please check :-)
Volker
(This used to be commit 9daea0ccfdda58450be3c9a9a94c016f5900c319)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/process.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 332a2e4da3..b2d19e11e3 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -164,7 +164,7 @@ static NTSTATUS receive_smb_raw_talloc_partial_read(TALLOC_CTX *mem_ctx, ssize_t toread; NTSTATUS status; - memcpy(writeX_header, lenbuf, sizeof(lenbuf)); + memcpy(writeX_header, lenbuf, 4); status = read_socket_with_timeout( fd, writeX_header + 4, |