Commit 457dd025 by Holger Brunck Committed by Tom Rini

cramfs: fix bug for wrong filename comparison

"cramfsload uImage_1" succeeds even though the actual file is named "uImage". Fix file name comparison when one name is the prefix of the other. Signed-off-by: 's avatarHolger Brunck <> cc: Wolfgang Denk <> cc: Albert ARIBAUD <>
parent c8605bb4
......@@ -126,7 +126,8 @@ static unsigned long cramfs_resolve (unsigned long begin, unsigned long offset,
if (!strncmp (filename, name, namelen)) {
if (!strncmp(filename, name, namelen) &&
(namelen == strlen(filename))) {
char *p = strtok (NULL, "/");
if (raw && (p == NULL || *p == '\0'))
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