aboutsummaryrefslogtreecommitdiff
path: root/contrib/pgcrypto/px-crypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/pgcrypto/px-crypt.c')
-rw-r--r--contrib/pgcrypto/px-crypt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/pgcrypto/px-crypt.c b/contrib/pgcrypto/px-crypt.c
index 7b003a76ca6..e3246fc5b9d 100644
--- a/contrib/pgcrypto/px-crypt.c
+++ b/contrib/pgcrypto/px-crypt.c
@@ -42,7 +42,7 @@ run_crypt_des(const char *psw, const char *salt,
char *res;
res = px_crypt_des(psw, salt);
- if (strlen(res) > len - 1)
+ if (res == NULL || strlen(res) > len - 1)
return NULL;
strcpy(buf, res);
return buf;