OpenSC/OpenSC — comment on commit 8c9832afba2806d6174313bc7010b6c93f14a286
File: src/libopensc/reader-pcsc.c line 792
By LudovicRousseau:

This will only work on a little endian machine.

The byte ordering in PCSC documentation is litlle order (AFAIK). So (uint16_t) *p would not work on a big endian machine.
I will ask the PC/SC workgoup for clarification on this point.