diff options
author | Håkon Nessjøen <haakon.nessjoen@gmail.com> | 2011-02-24 03:06:39 +0100 |
---|---|---|
committer | Håkon Nessjøen <haakon.nessjoen@gmail.com> | 2011-02-24 03:06:39 +0100 |
commit | d5f936e9c017f884b070f41748ce502a0bb131d7 (patch) | |
tree | f9d68d3fff01848e52188fae40aa8b815f06c6c0 | |
parent | a2b0eda2d0ac5910ade5fa1193dae0c56a521ecb (diff) | |
download | MAC-Telnet-d5f936e9c017f884b070f41748ce502a0bb131d7.tar.gz MAC-Telnet-d5f936e9c017f884b070f41748ce502a0bb131d7.zip |
Bugfix of two bugs making raw mode unusable/unstable.
-rw-r--r-- | protocol.c | 2 | ||||
-rw-r--r-- | udp.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -48,7 +48,7 @@ int init_packet(struct mt_packet *packet, enum mt_ptype ptype, unsigned char *sr #if BYTE_ORDER == LITTLE_ENDIAN sessionkey = htons(sessionkey); #endif - memcpy(data + 15, &sessionkey, sizeof(sessionkey)); + memcpy(data + 16, &sessionkey, sizeof(sessionkey)); /* Client type: Mac Telnet */ memcpy(data + 14, &mt_mactelnet_clienttype, sizeof(mt_mactelnet_clienttype)); @@ -44,7 +44,7 @@ unsigned short udp_sum_calc(unsigned char *src_addr,unsigned char *dst_addr, uns /* Padding ? */ padd = (len % 2); if (padd){ - data[len + padd]=0; + data[len]=0; } /* header+data */ |