diff options
author | Volker Lendecke <vl@samba.org> | 2008-03-23 15:56:41 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-03-23 16:21:59 +0100 |
commit | fd9efee21d1ed8029032eefe356bcca6d06ae671 (patch) | |
tree | 242f0501d10a0e5dcf51bad560b45eeb895940a6 /source3/lib | |
parent | 527b56182443fb47989bc6fc2108f3f016aa52c4 (diff) | |
download | samba-fd9efee21d1ed8029032eefe356bcca6d06ae671.tar.gz samba-fd9efee21d1ed8029032eefe356bcca6d06ae671.tar.bz2 samba-fd9efee21d1ed8029032eefe356bcca6d06ae671.zip |
Fix Coverity ID 436
(This used to be commit 9e0ee1ad4fe0f0e7dec0b6824ef234147d845b8d)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/popt_common.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/lib/popt_common.c b/source3/lib/popt_common.c index 7f7d23fa00..8f0f7c62bb 100644 --- a/source3/lib/popt_common.c +++ b/source3/lib/popt_common.c @@ -327,6 +327,11 @@ static void get_password_file(void) close_it = True; } + if (fd < 0) { + fprintf(stderr, "fd = %d, < 0\n", fd); + exit(1); + } + for(p = pass, *p = '\0'; /* ensure that pass is null-terminated */ p && p - pass < sizeof(pass);) { switch (read(fd, p, 1)) { |