Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
01d02814
Commit
01d02814
authored
Jul 26, 2002
by
David Woodhouse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent crash after mounting JFFS2 images built with incorrect erase size.
parent
1390bfa0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
fs/jffs2/scan.c
fs/jffs2/scan.c
+11
-1
No files found.
fs/jffs2/scan.c
View file @
01d02814
...
...
@@ -7,7 +7,7 @@
*
* For licensing information, see the file 'LICENCE' in this directory.
*
* $Id: scan.c,v 1.7
8 2002/07/02 22:48:24
dwmw2 Exp $
* $Id: scan.c,v 1.7
9 2002/07/25 20:48:51
dwmw2 Exp $
*
*/
#include <linux/kernel.h>
...
...
@@ -322,6 +322,16 @@ static int jffs2_scan_eraseblock (struct jffs2_sb_info *c, struct jffs2_eraseblo
continue
;
}
if
(
ofs
+
node
.
totlen
>
jeb
->
offset
+
c
->
sector_size
)
{
/* Eep. Node goes over the end of the erase block. */
printk
(
KERN_WARNING
"Node at 0x%08x with length 0x%08x would run over the end of the erase block
\n
"
,
ofs
,
node
.
totlen
);
printk
(
KERN_WARNING
"Perhaps the file system was created with the wrong erase size?
\n
"
);
DIRTY_SPACE
(
4
);
ofs
+=
4
;
continue
;
}
if
(
!
(
node
.
nodetype
&
JFFS2_NODE_ACCURATE
))
{
/* Wheee. This is an obsoleted node */
D2
(
printk
(
KERN_DEBUG
"Node at 0x%08x is obsolete. Skipping
\n
"
,
ofs
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment