From b059e2cbf1d6190c996a1ff6b8f426a493ae937c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 16 Nov 2007 17:06:57 -0800 Subject: Ensure we use PATH_MAX for symlinks. Jeremy. (This used to be commit a90ef69350c5efcf8dcf95d4853cbe3c662d1ba3) --- source3/smbd/trans2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/smbd/trans2.c') diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 3abc0d065c..bb24db9ee1 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -4168,7 +4168,7 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd case SMB_QUERY_FILE_UNIX_LINK: { - char *buffer = TALLOC_ARRAY(ctx, char, 1024); + char *buffer = TALLOC_ARRAY(ctx, char, PATH_MAX+1); if (!buffer) { reply_nterror(req, NT_STATUS_NO_MEMORY); @@ -4187,7 +4187,7 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd return; #endif len = SMB_VFS_READLINK(conn,fullpathname, - buffer, 1023); + buffer, PATH_MAX); if (len == -1) { reply_unixerror(req, ERRDOS, ERRnoaccess); -- cgit