mirror of
https://github.com/postgres/postgres.git
synced 2025-06-26 12:21:12 +03:00
Fix a couple of places where the result of fgets() wasn't checked.
This is mostly to suppress compiler warnings, although in principle the cases could result in undesirable behavior. Martin Pitt
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.391 2010/03/17 20:58:38 petere Exp $
|
||||
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.392 2010/04/30 17:09:13 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -4400,7 +4400,8 @@ PasswordFromFile(char *hostname, char *port, char *dbname, char *username)
|
||||
*ret;
|
||||
int len;
|
||||
|
||||
fgets(buf, sizeof(buf), fp);
|
||||
if (fgets(buf, sizeof(buf), fp) == NULL)
|
||||
break;
|
||||
|
||||
len = strlen(buf);
|
||||
if (len == 0)
|
||||
|
Reference in New Issue
Block a user