Ah yes, /dev/random will give short reads if the entropy pool is low. I.e., it will give you a short read if it can do that rather than hang. Again, /dev/random is really only justified if you need cryptographic security.