]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/plugins/passprompt.c
Fix obvious subscript-out-of-range error.
[ppp.git] / pppd / plugins / passprompt.c
index 6c2c8284fd535c79384e0fb389f2198bfa54f665..1d885fcea53ba53fa732381ad69be3737def9ad5 100644 (file)
@@ -50,7 +50,7 @@ static int promptpass(char *user, char *passwd)
     }
     if (!kid) {
        /* we are the child, exec the program */
-       char *argv[4], fdstr[32];
+       char *argv[5], fdstr[32];
        sys_close();
        closelog();
        close(p[0]);
@@ -74,6 +74,8 @@ static int promptpass(char *user, char *passwd)
        if (red == 0)
            break;
        if (red < 0) {
+           if (errno == EINTR)
+               continue;
            error("Can't read secret from %s: %m", promptprog);
            readgood = -1;
            break;