samdmarshall/SDMMobileDevice

Wrong endian-ness conversion?

JeremyAgost opened this issue · 2 comments

In SDMMD_AppleFileConduit.c, there are several places where htole64() is used. This doesn't seem correct because on OS X it will evaluate to just a uint64_t cast. Since on Mac the host byte order is already little endian ('le64'). If the goal is to transform device big-endian into host little-endian, the correct function to use is be64toh(). That's big-endian to host.

does this still need to be fixed?

Probably. I'll add it to the list of things to patch.

-Jeremy

On Oct 30, 2014, at 11:20 PM, Sam Marshall notifications@github.com wrote:

does this still need to be fixed?


Reply to this email directly or view it on GitHub.