Hi,

we've found ksh sometimes produces syntax error when parsing correct script 
containing multibyte characters. It seems it's caused by typo in sources. 
Patch and testing script attached.

Regards,
Michal Hlavinka
--- a/src/cmd/ksh93/sh/fcin.c.original	2009-11-18 09:23:57.000000000 +0900
+++ b/src/cmd/ksh93/sh/fcin.c	2009-11-18 09:24:15.000000000 +0900
@@ -185,7 +185,7 @@
 	    case -1:
 		if(_Fcin._fcfile && (n=(_Fcin.fclast-_Fcin.fcptr)) < MB_LEN_MAX)
 		{
-			memcmp(extra.buff, _Fcin.fcptr, n);
+			memcpy(extra.buff, _Fcin.fcptr, n);
 			_Fcin.fcptr = _Fcin.fclast;
 			for(i=n; i < MB_LEN_MAX+n; i++)
 			{

Attachment: testKO.ksh
Description: application/shellscript

_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to