1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

Fix Coverity ID 436

(This used to be commit 9e0ee1ad4f)
This commit is contained in:
Volker Lendecke 2008-03-23 15:56:41 +01:00
parent 527b561824
commit fd9efee21d

View File

@ -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)) {