Skip to content

Commit

Permalink
get_acorn_filename(): deobfuscate a bit
Browse files Browse the repository at this point in the history
Lots of Idiotic Silly Parentheses is -> that way...  What that
condition checks is that there's exactly 32 bytes between the
end of name and the end of entire drectory record.

Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed May 9, 2016
1 parent 972b241 commit e17a21d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/isofs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int get_acorn_filename(struct iso_directory_record *de,
std = sizeof(struct iso_directory_record) + de->name_len[0];
if (std & 1)
std++;
if ((*((unsigned char *) de) - std) != 32)
if (de->length[0] - std != 32)
return retnamlen;
chr = ((unsigned char *) de) + std;
if (strncmp(chr, "ARCHIMEDES", 10))
Expand Down

0 comments on commit e17a21d

Please sign in to comment.