Fix possible buffer overrun and/or unportable behavior in pg_md5_encrypt()
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 15 Sep 2009 02:31:15 +0000 (02:31 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 15 Sep 2009 02:31:15 +0000 (02:31 +0000)
commitda2fa6f8828fffe01c9a435e1d6cbeb02a76861e
tree8624a76301a7fabf657030128697c8980bf1112a
parent05754a951cc879435bd14fdd85eb8ad4c6a14920
Fix possible buffer overrun and/or unportable behavior in pg_md5_encrypt()
if salt_len == 0.  This seems to be mostly academic, since nearly all calling
code paths guarantee nonempty salt; the only case that doesn't is
PQencryptPassword where the caller could mistakenly pass an empty username.
So, fix it but don't bother backpatching.  Per ljb.
src/backend/libpq/md5.c