marceloabelda / agentuino

Automatically exported from code.google.com/p/agentuino
0 stars 0 forks source link

IP Addr Decode Overwites/Blanks Data #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. see memset in line 312 Agentuino.h
2.
3.

What is the expected output? What do you see instead?
Expected: x.x.x.x
Actual: 0.0.0.0

What version of the product are you using? On what operating system?
Latest

Please provide any additional information below.
Also, why is the byte order being reversed?  (tested on a Windows machine and 
monitored over wireshark, PDU->data for IP contained proper order, your code [ 
size+3-i] reverses it; ex: 1.2.3.4 becomes 4.3.2.1)

Original issue reported on code.google.com by averb...@gmail.com on 30 Jun 2012 at 9:47

GoogleCodeExporter commented 8 years ago
Correction:
*p++ = data[size - 1 - i];

Should be: 
*p++ = data[size - 4 + i];

Original comment by averb...@gmail.com on 30 Jun 2012 at 9:53

GoogleCodeExporter commented 8 years ago
Can't answer for the reverse, but I changed Agentuino.h with your info as rev 47

Original comment by alfso...@gmail.com on 6 Jul 2012 at 10:24