git.samba.org
/
kai
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d50b4e
)
Fix Coverity ID 436
author
Volker Lendecke
<vl@samba.org>
Sun, 23 Mar 2008 14:56:41 +0000
(15:56 +0100)
committer
Volker Lendecke
<vl@samba.org>
Sun, 23 Mar 2008 15:21:59 +0000
(16:21 +0100)
source/lib/popt_common.c
patch
|
blob
|
history
diff --git
a/source/lib/popt_common.c
b/source/lib/popt_common.c
index 7f7d23fa00b9daff311984ecd93c46f7714e1ee1..8f0f7c62bb9e6ace3982774dfd07533ea99ae663 100644
(file)
--- a/
source/lib/popt_common.c
+++ b/
source/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)) {