From 075de03d1cb7badd4c5bb7835f6a8632b2fd4710 Mon Sep 17 00:00:00 2001 From: Pete LaDow Date: Thu, 17 Mar 2016 15:12:57 -0700 Subject: [PATCH] Use FILENAME_MAX to determine BUFSIZE when getting socket path. --- tests/test_term_endpoint.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_term_endpoint.cpp b/tests/test_term_endpoint.cpp index addf44ab..99d934b6 100644 --- a/tests/test_term_endpoint.cpp +++ b/tests/test_term_endpoint.cpp @@ -27,9 +27,11 @@ along with this program. If not, see . */ +#include #include "testutil.hpp" -#define BUF_SIZE 73 +/* Use the worst case filename size for the buffer (+1 for trailing NUL) */ +#define BUF_SIZE (FILENAME_MAX+1) int main (void) {