Data from -ΠΌΠΌ debug output:
----------------------------------
==> PASV ... ---->PASV
Checking whether 3 is writable... 1 (115:Operation now in progress)
[227] 'Entering Passive Mode (192,168,0,100,4,73)'
done.
Remote server data port: 192.168.56.34:1097
----------------------------------
From a phrase a server sent us we can see that the server IP is
192.168.0.100 (as it should be, because my ftp server IP is that one).
But after wput parsed string from the server we can see bytes 3 and 4 (56
and 34 respectively) are wrong.
This behaviour caused by a method we allocate memory for IP data.
We use allocate dynamic array on the stack in function
"parse_passive_string" like that:
char temp[6];
And then we pass a pointer to this array outside the function.
So, either we have to make this array "static" (the easiest way) like
that:
static char temp[6];
or allocate 6 bytes in "ftp_do_passive" function and pass a pointer to this
memory area to the "parse_passive_string" (the best way).
Giovanni Bechis
Core Source
None
Public
|
Date: 2008-12-24 10:23 I took a look at the source, there is no pointer passed outside the |
|
Date: 2008-12-24 08:36 I have tried a bit but it works for me: |
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2008-12-24 08:36 | gbechis |
| resolution_id | None | 2008-12-24 08:36 | gbechis |
| close_date | - | 2008-12-24 08:36 | gbechis |
| assigned_to | nobody | 2008-12-24 00:29 | bolick |
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use