cURL / Mailing Lists / curl-library / Single Mail

curl-library

Wrong data received in a write callback

From: Nicolas Martin <nico.martin_at_gmail.com>
Date: Wed, 16 May 2007 11:54:03 +0200

Hello,

I'm using libcurl 7.15.5 in a small download utility I wrote. This
software is cross compiled and ran on an ARM9 platform.

Performing some testing, I noticed some downloaded files (about 5%)
are different from the original.
The corruption consists in a few bytes changed in a whole file, for
example this diff:

2957,2959c2957,2959
  000b8d0 4160 6e7f 1a99 9b03 7223 d368 11ec 23f3
  000b8e0 4619 32f9 a434 6dd4 f9b6 81e1 a203 4bc2
  000b8f0 e04e 578a c3df 4812 906a afbe d3ff fee5

---
  000b8d0 4160 6e7f 1a99 9b03 7223 0100 0010 0200
  000b8e0 0020 d940 c5d2 13e0 c44f 0000 0000 3300
  000b8f0  c61c 7ed4 c00c 0100 0010 afbe d3ff fee5
I dumped the data received in the write callback (*ptr) and noticed
that this data is already faulty (i.e it's not a problem of i/o disk).
The software compiled for a i386 platform never yields this problem,
hence it is a problem on the platform side.
My question is, what tools would you recommend to me that I could use
to find the underlying problem ? I've seen there is a memory debug
utility that can be compiled in libcurl, but any more pieces of advice
are welcome.
Regards,
Nicolas
Received on 2007-05-16