On Sun, Jun 21, 2020 at 07:08:17AM +0300, Egor Chelak wrote:
> The flags byte of the dirent was accessed as de->flags[0] in a couple of
> places, and not as de->flags[-sbi->s_high_sierra], which is how it's
> accessed elsewhere. This caused a bug, where some files on an HSF disc
> could be inaccessible.

> +++ b/fs/isofs/dir.c
> @@ -50,6 +50,7 @@ int isofs_name_translate(struct iso_directory_record *de, 
> char *new, struct inod
>  int get_acorn_filename(struct iso_directory_record *de,
>                           char *retname, struct inode *inode)
>  {
> +     struct isofs_sb_info *sbi = ISOFS_SB(inode->i_sb);
>       int std;
>       unsigned char *chr;
>       int retnamlen = isofs_name_translate(de, retname, inode);
> @@ -66,7 +67,7 @@ int get_acorn_filename(struct iso_directory_record *de,
>               return retnamlen;
>       if ((*retname == '_') && ((chr[19] & 1) == 1))
>               *retname = '!';
> -     if (((de->flags[0] & 2) == 0) && (chr[13] == 0xff)
> +     if (((de->flags[-sbi->s_high_sierra] & 2) == 0) && (chr[13] == 0xff)
>               && ((chr[12] & 0xf0) == 0xf0)) {
>               retname[retnamlen] = ',';
>               sprintf(retname+retnamlen+1, "%3.3x",

It's been about 22 years since I contributed the patch which added
support for the Acorn extensions ;-)  But I'm pretty sure that it's not
possible to have an Acorn CD-ROM that is also an HSF CD-ROM.  That is,
all Acorn formatted CD-ROMs are ISO-9660 compatible.  So I think this
chunk of the patch is not required.

Reply via email to