Disagree quite strongly -- use the correct type. Yes, lengths are ulongs on AMD64, yes this means a lot of uints turn into size_t, but that's how it's supposed to be IMO.