OSDN Git Service

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)
commit9a3f5301ff0e4721e560eea698702c690f8d70db
treec175a8d2327c41283b51186f58aac43a78b963d7
parentc82fdb698425ddeb9e0c7d2d01c2ce0bc3fb088f
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