diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-08-29 19:04:53 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-08-29 19:04:53 +0200 |
commit | 65850a1bad2aefd02b80ac275a5e879200c77ca2 (patch) | |
tree | c018e58f3722d7977e0f0a0f7ebc4aa2c6581d4b /libssh/packet.c | |
parent | 1137f0d48c9211a7a885d73400c50a8d979b0a66 (diff) | |
download | libssh-65850a1bad2aefd02b80ac275a5e879200c77ca2.tar.gz libssh-65850a1bad2aefd02b80ac275a5e879200c77ca2.tar.xz libssh-65850a1bad2aefd02b80ac275a5e879200c77ca2.zip |
Fix "void * ptr used in pointer arithmetic" warng
Diffstat (limited to 'libssh/packet.c')
-rw-r--r-- | libssh/packet.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libssh/packet.c b/libssh/packet.c index 4aadf56e..f0a56b17 100644 --- a/libssh/packet.c +++ b/libssh/packet.c @@ -318,7 +318,7 @@ static int packet_read1(SSH_SESSION *session) { } memcpy(&crc, - buffer_get_rest(session->in_buffer) + (len+padding) - sizeof(uint32_t), + (unsigned char *)buffer_get_rest(session->in_buffer) + (len+padding) - sizeof(uint32_t), sizeof(uint32_t)); buffer_pass_bytes_end(session->in_buffer, sizeof(uint32_t)); crc = ntohl(crc); @@ -544,7 +544,7 @@ static int packet_send1(SSH_SESSION *session) { goto error; } - crc = ssh_crc32(buffer_get(session->out_buffer) + sizeof(uint32_t), + crc = ssh_crc32((char *)buffer_get(session->out_buffer) + sizeof(uint32_t), buffer_get_len(session->out_buffer) - sizeof(uint32_t)); if (buffer_add_u32(session->out_buffer, ntohl(crc)) < 0) { @@ -556,7 +556,7 @@ static int packet_send1(SSH_SESSION *session) { buffer_get_len(session->out_buffer)); #endif - packet_encrypt(session, buffer_get(session->out_buffer) + sizeof(uint32_t), + packet_encrypt(session, (unsigned char *)buffer_get(session->out_buffer) + sizeof(uint32_t), buffer_get_len(session->out_buffer) - sizeof(uint32_t)); #ifdef DEBUG_CRYPTO |