From 4ba74a357376c8f8bf49487f96ae71cf2460c3f3 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Wed, 10 Oct 2012 07:05:10 -0300 Subject: * crypt/crypt-private.h: Include stdbool.h. (_ufc_setup_salt_r): Return bool. * crypt/crypt-entry.c: Include errno.h. (__crypt_r): Return NULL with EINVAL for bad salt. * crypt/crypt_util.c (bad_for_salt): New. (_ufc_setup_salt_r): Check that salt is long enough and within the specified alphabet. * crypt/badsalttest.c: New file. * crypt/Makefile (tests): Add it. ($(objpfx)badsalttest): New. --- crypt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypt/Makefile') diff --git a/crypt/Makefile b/crypt/Makefile index 3a61865a1b..3d4f243ed5 100644 --- a/crypt/Makefile +++ b/crypt/Makefile @@ -28,7 +28,7 @@ extra-libs-others := $(extra-libs) libcrypt-routines := crypt-entry md5-crypt sha256-crypt sha512-crypt crypt \ crypt_util -tests := cert md5c-test sha256c-test sha512c-test +tests := cert md5c-test sha256c-test sha512c-test badsalttest include ../Makeconfig -- cgit v1.2.3