updated for version 7.4.522
Problem:    Specifying wrong buffer size for GetLongPathName().
Solution:   Use the actual size. (Ken Takata)
diff --git a/src/eval.c b/src/eval.c
index 1b1072c..c7cc008 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -24762,7 +24762,7 @@
 	    p = alloc(_MAX_PATH + 1);
 	    if (p != NULL)
 	    {
-		if (GetLongPathName(*fnamep, p, MAXPATHL))
+		if (GetLongPathName(*fnamep, p, _MAX_PATH))
 		{
 		    vim_free(*bufp);
 		    *bufp = *fnamep = p;
diff --git a/src/version.c b/src/version.c
index 758c686..7a86692 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    522,
+/**/
     521,
 /**/
     520,