Index: vm/port/src/file_io/linux/canonical.c =================================================================== --- vm/port/src/file_io/linux/canonical.c (revision 634606) +++ vm/port/src/file_io/linux/canonical.c (working copy) @@ -54,7 +54,10 @@ case '.':{ switch(*path_name){ case '.': // we encounter '..' - path_name += 2; //skip the following "./" + // if not ".." is specified + if(*(path_name + 1) != '\0') { + path_name += 2; // skip the following "./" + } if (*(cp - 1) == PORT_FILE_SEPARATOR) //if cano_path now is "/xx/yy/" --cp; //skip backward the tail '/' *cp = '\0'; Index: vm/port/src/file_io/win/canonical.c =================================================================== --- vm/port/src/file_io/win/canonical.c (revision 634606) +++ vm/port/src/file_io/win/canonical.c (working copy) @@ -53,7 +53,9 @@ case '.':{ switch(*path_name){ case '.': // we encounter '..' - path_name += 2; //skip the following "./" + if(*(path_name + 1) != '\0') { + path_name += 2; //skip the following "./" + } if (*(cp - 1) == PORT_FILE_SEPARATOR) //if cano_path now is "/xx/yy/" --cp; //skip backward the tail '/' *cp = '\0';