]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix some issues detected by clang.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Fri, 18 Oct 2013 20:55:33 +0000 (20:55 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Fri, 18 Oct 2013 20:55:33 +0000 (20:55 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11343 a1ca3aef-8c08-0410-bb20-df032aa958be

scheduler/auth.c
scheduler/cups-driverd.cxx

index b1dd60810abc2d39924fc07a5b7cb5e89446c320..5566e6ce650392594b8a8acbda1f2a0e9c2a3ae3 100644 (file)
@@ -458,7 +458,7 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
 #endif /* HAVE_AUTHORIZATION_H */
 #if defined(SO_PEERCRED) && defined(AF_LOCAL)
   else if (!strncmp(authorization, "PeerCred ", 9) &&
-           con->http->hostaddr->addr.sa_family == AF_LOCAL)
+           con->http->hostaddr->addr.sa_family == AF_LOCAL && con->best)
   {
    /*
     * Use peer credentials from domain socket connection...
index 31a8a25a00649eabb5c24293f2629263af5bab01..49aabf60c90fbe3319546d8532ce9d9b038e2df8 100644 (file)
@@ -645,7 +645,7 @@ cat_tar(const char *name,           /* I - PPD name */
   */
 
   if ((fp = get_file(name, request_id, "model", filename, sizeof(filename),
-                     &ppdname)) == NULL)
+                     &ppdname)) == NULL || !ppdname)
     return (1);
 
  /*