mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone
Blob Blame History Raw
From 9392c0f95695bd83ec5805f35b32d9d1f5c09d7c Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 9 Oct 2013 12:07:39 +0100
Subject: [PATCH] fish: Use UNIX_PATH_MAX instead of hard-coded value for max
 length of socket buf.

(cherry picked from commit 9f1bcbca55661632176dea4e1dadc4dea0ca7f21)
---
 fish/rc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fish/rc.c b/fish/rc.c
index bbaaee7..aa4b849 100644
--- a/fish/rc.c
+++ b/fish/rc.c
@@ -180,7 +180,7 @@ close_stdout (void)
 void
 rc_listen (void)
 {
-  char sockpath[128];
+  char sockpath[UNIX_PATH_MAX];
   pid_t pid;
   struct sockaddr_un addr;
   int sock, s;
@@ -336,7 +336,7 @@ rc_remote (int pid, const char *cmd, size_t argc, char *argv[],
   guestfish_hello hello;
   guestfish_call call;
   guestfish_reply reply;
-  char sockpath[128];
+  char sockpath[UNIX_PATH_MAX];
   struct sockaddr_un addr;
   int sock;
   FILE *fp;
-- 
1.8.3.1