Commit e17a21d3 authored by Al Viro's avatar Al Viro

get_acorn_filename(): deobfuscate a bit

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: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 972b241f
...@@ -58,7 +58,7 @@ int get_acorn_filename(struct iso_directory_record *de, ...@@ -58,7 +58,7 @@ int get_acorn_filename(struct iso_directory_record *de,
std = sizeof(struct iso_directory_record) + de->name_len[0]; std = sizeof(struct iso_directory_record) + de->name_len[0];
if (std & 1) if (std & 1)
std++; std++;
if ((*((unsigned char *) de) - std) != 32) if (de->length[0] - std != 32)
return retnamlen; return retnamlen;
chr = ((unsigned char *) de) + std; chr = ((unsigned char *) de) + std;
if (strncmp(chr, "ARCHIMEDES", 10)) if (strncmp(chr, "ARCHIMEDES", 10))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment