[Feature][ZXW-285]merge P56U05 version

Only Configure: No
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No

Change-Id: Ied657102425a179a89ef41847170152e8a5d437c
diff --git a/ap/libc/glibc/glibc-2.23/posix/glob.c b/ap/libc/glibc/glibc-2.23/posix/glob.c
index a1e49ec..02dfd5f 100755
--- a/ap/libc/glibc/glibc-2.23/posix/glob.c
+++ b/ap/libc/glibc/glibc-2.23/posix/glob.c
@@ -827,7 +827,7 @@
 		  *p = '\0';
 		}
 	      else
-		*((char *) mempcpy (newp, dirname + 1, end_name - dirname))
+		*((char *) mempcpy (newp, dirname + 1, end_name - dirname - 1))
 		  = '\0';
 	      user_name = newp;
 	    }
diff --git a/ap/libc/glibc/glibc-2.23/posix/wordexp.c b/ap/libc/glibc/glibc-2.23/posix/wordexp.c
old mode 100644
new mode 100755
index ecc7615..48cf1d8
--- a/ap/libc/glibc/glibc-2.23/posix/wordexp.c
+++ b/ap/libc/glibc/glibc-2.23/posix/wordexp.c
@@ -1456,7 +1456,7 @@
   /* Is it a numeric parameter? */
   else if (isdigit (env[0]))
     {
-      int n = atoi (env);
+	  unsigned long n = strtoul (env, NULL, 10);
 
       if (n >= __libc_argc)
 	/* Substitute NULL. */