]> granicus.if.org Git - postgresql/commit
Fix typo in pg_srand48 (srand48 in older branches).
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 3 Sep 2011 20:17:44 +0000 (16:17 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 3 Sep 2011 20:17:44 +0000 (16:17 -0400)
commit0962182f01c1e29417b016a82c7947697daba82b
tree1711bd3ab007f098d751195647b64d764a03eb02
parent2cda30e757a95f2c2dfa9d3a1726959fa6b02357
Fix typo in pg_srand48 (srand48 in older branches).

">" should be ">>".  This typo results in failure to use all of the bits
of the provided seed.

This might rise to the level of a security bug if we were relying on
srand48 for any security-critical purposes, but we are not --- in fact,
it's not used at all unless the platform lacks srandom(), which is
improbable.  Even on such a platform the exposure seems minimal.

Reported privately by Andres Freund.
src/port/erand48.c