]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
Make sure create_unix_address_from_path() doesn't get passed the abstract
authorPeter Jones <pjones@redhat.com>
Wed, 4 Jun 2008 15:46:16 +0000 (11:46 -0400)
committerPeter Jones <pjones@pjones2.localdomain>
Wed, 4 Jun 2008 15:50:04 +0000 (11:50 -0400)
socket name (i.e. it gets path+1 and is_abstract=1 instead)

src/libply/ply-utils.c

index 9b5be1b56534f0e2346972d65c45fea9b92c99a5..625f2318df5f1ecbfa8f89afc555e089f05801ff 100644 (file)
@@ -138,7 +138,7 @@ create_unix_address_from_path (const char *path,
 {
   struct sockaddr_un *address; 
 
-  assert (path != NULL);
+  assert (path != NULL && path[0] != '\0');
   assert (strlen (path) < sizeof (address->sun_path));
 
   address = calloc (1, sizeof (struct sockaddr_un));