* libmisc/xgetXXbyYY.c, libmisc/myname.c, libmisc/getgr_nam_gid.c,

libmisc/salt.c, libmisc/list.c, libmisc/cleanup.c, src/login.c,
	lib/getdef.h, lib/groupio.c, lib/getlong.c, lib/gshadow_.h,
	lib/sgroupio.c, lib/shadowio.c, lib/pwio.c, lib/commonio.h,
	lib/fputsx.c, lib/prototypes.h: Added splint annotations.
	* lib/groupio.c: Avoid implicit conversion of pointers to
	booleans.
	* lib/groupio.c: Free allocated buffers in case of failure.
This commit is contained in:
nekral-guest
2009-04-23 09:57:03 +00:00
parent fef6f9379a
commit 614c79defc
16 changed files with 80 additions and 64 deletions

View File

@@ -21,14 +21,14 @@
/* local function prototypes */
static void seedRNG (void);
static char *gensalt (size_t salt_size);
static /*@observer@*/const char *gensalt (size_t salt_size);
#ifdef USE_SHA_CRYPT
static size_t SHA_salt_size (void);
static const char *SHA_salt_rounds (int *prefered_rounds);
static /*@observer@*/const char *SHA_salt_rounds (/*@null@*/int *prefered_rounds);
#endif /* USE_SHA_CRYPT */
#ifndef HAVE_L64A
static char *l64a(long value)
static /*@observer@*/char *l64a(long value)
{
static char buf[8];
char *s = buf;
@@ -104,7 +104,7 @@ static size_t SHA_salt_size (void)
/*
* Return a salt prefix specifying the rounds number for the SHA crypt methods.
*/
static const char *SHA_salt_rounds (int *prefered_rounds)
static /*@observer@*/const char *SHA_salt_rounds (/*@null@*/int *prefered_rounds)
{
static char rounds_prefix[18];
long rounds;
@@ -168,7 +168,7 @@ static const char *SHA_salt_rounds (int *prefered_rounds)
#define MAX_SALT_SIZE 16
#define MIN_SALT_SIZE 8
static char *gensalt (size_t salt_size)
static /*@observer@*/const char *gensalt (size_t salt_size)
{
static char salt[32];
@@ -202,7 +202,7 @@ static char *gensalt (size_t salt_size)
* * For the SHA256 and SHA512 method, this specifies the number of rounds
* (if not NULL).
*/
char *crypt_make_salt (const char *meth, void *arg)
/*@observer@*/const char *crypt_make_salt (/*@null@*/const char *meth, /*@null@*/void *arg)
{
/* Max result size for the SHA methods:
* +3 $5$