From: Al Viro Date: Thu, 5 May 2016 14:48:47 +0000 (-0400) Subject: get_acorn_filename(): deobfuscate a bit X-Git-Tag: v4.7-rc1~144^2~14 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e17a21d3bb067e561fc0112a3957f579af26d9d9;p=karo-tx-linux.git 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: Al Viro --- diff --git a/fs/isofs/dir.c b/fs/isofs/dir.c index b943cbd963bb..dfd14e1b9dcf 100644 --- a/fs/isofs/dir.c +++ b/fs/isofs/dir.c @@ -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))