Use FILENAME_MAX to determine BUFSIZE when getting socket path.

This commit is contained in:
Pete LaDow 2016-03-17 15:12:57 -07:00
parent de56bc2729
commit 075de03d1c

View File

@ -27,9 +27,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <stdio.h>
#include "testutil.hpp" #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) int main (void)
{ {