summaryrefslogtreecommitdiff
path: root/contrib/pgcrypto/crypt-des.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/pgcrypto/crypt-des.c')
-rw-r--r--contrib/pgcrypto/crypt-des.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/pgcrypto/crypt-des.c b/contrib/pgcrypto/crypt-des.c
index cea80b55e9..cc2e76a71f 100644
--- a/contrib/pgcrypto/crypt-des.c
+++ b/contrib/pgcrypto/crypt-des.c
@@ -670,7 +670,8 @@ px_crypt_des(const char *key, const char *setting)
q = (uint8 *) keybuf;
while (q - (uint8 *) keybuf - 8)
{
- if ((*q++ = *key << 1))
+ *q++ = *key << 1;
+ if (*key != '\0')
key++;
}
if (des_setkey((char *) keybuf))