screen-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[screen-devel] [bug #49189] segfault in src/authentication.c fix


From: Arseniy Simonov
Subject: [screen-devel] [bug #49189] segfault in src/authentication.c fix
Date: Mon, 26 Sep 2016 11:41:48 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?49189>

                 Summary: segfault in src/authentication.c fix
                 Project: GNU Screen
            Submitted by: catterer
            Submitted on: Mon 26 Sep 2016 11:41:45 AM GMT
                Category: Crash/Freeze/Infloop
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
                 Release: Cur Dev Sources
           Fixed Release: None
         Planned Release: None
           Work Required: None

    _______________________________________________________

Details:


$ git diff
diff --git a/src/authentication.c b/src/authentication.c
index 4c02eb6..27f109e 100644
--- a/src/authentication.c
+++ b/src/authentication.c
@@ -124,8 +124,10 @@ static bool CheckPassword() {
        p = getspnam(ppp->pw_name);
        seteuid(uid);
        setegid(gid);
-       if (p == NULL)
+       if (p == NULL) {
                fprintf(stderr, "can't open passwd file\n");
+                return false;
+        }
 
        printf("\ascreen used by %s%s<%s> on %s.\n",
                ppp->pw_gecos, ppp->pw_gecos[0] ? " " : "", ppp->pw_name,
HostName);






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49189>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]