Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Sunxi Tools
Commits
3413153e
Commit
3413153e
authored
Jul 23, 2013
by
Pat Wood
Browse files
check that starting offset of partition 1 is beyond MBR area
parent
762d32a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
nand-part.c
View file @
3413153e
...
...
@@ -348,6 +348,13 @@ int main (int argc, char **argv)
argc
--
;
argv
++
;
}
if
(
start
<
MBR_SIZE
*
MBR_COPY_NUM
/
512
)
{
printf
(
"Partition 1 starting offset must be at least %d
\n
"
,
MBR_SIZE
*
MBR_COPY_NUM
/
512
);
close
(
fd
);
return
-
3
;
}
for
(
i
=
0
;
i
<
argc
;
i
++
)
{
if
(
sscanf
(
argv
[
i
],
"%s %d %d"
,
names
[
i
],
&
lens
[
i
],
&
user_types
[
i
])
<
2
)
{
printf
(
"bad 'name len' argument
\n
"
);
...
...
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