After we've been hit by Large File Support problems several times in the past week (which only occur on 32 bit platforms, which I don't have), this is yet another attempt to fix the issue.
It is illegal to pass a NULL buffer to pcm_byteswap_X(). The result of this is that pcm_byteswap_X() never returns NULL.