From 32f63996385baae4f02d962bef3a674dddb9bbf6 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Fri, 13 Jan 2006 20:59:48 +0000 Subject: Relevant BUGIDs: Purpose of commit: bugfix Commit summary: --------------- 2006-01-13 Thorsten Kukuk * libpam_misc/misc_conv.c (misc_conv): Fix strict aliasing error. * modules/pam_umask/pam_umask.c (search_key): Don't ignore EOF/error return value from fgets(). * configure.in: Check for getline and getdelim --- modules/pam_umask/pam_umask.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/pam_umask/pam_umask.c b/modules/pam_umask/pam_umask.c index e93efc01..46f25ae7 100644 --- a/modules/pam_umask/pam_umask.c +++ b/modules/pam_umask/pam_umask.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005 Thorsten Kukuk + * Copyright (c) 2005, 2006 Thorsten Kukuk * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -105,8 +105,9 @@ search_key (const char *filename) buf = malloc (buflen); } buf[0] = '\0'; - fgets (buf, buflen - 1, fp); - if (buf != NULL) + if (fgets (buf, buflen - 1, fp) == NULL) + break; + else if (buf != NULL) n = strlen (buf); else n = 0; -- cgit v1.2.3