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
fa39a095
Commit
fa39a095
authored
May 04, 2012
by
Alejandro Mery
Browse files
script: don't accept empty section or entry names
parent
da2d50ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
script.c
View file @
fa39a095
...
...
@@ -57,7 +57,7 @@ struct script_section *script_section_append(struct script *script,
struct
script_section
*
section
;
assert
(
script
);
assert
(
name
);
assert
(
name
&&
*
name
);
if
((
section
=
malloc
(
sizeof
(
*
section
))))
{
size_t
l
=
strlen
(
name
);
...
...
@@ -146,7 +146,7 @@ struct script_null_entry *script_null_entry_append(struct script *script,
assert
(
script
);
assert
(
!
list_empty
(
&
script
->
sections
));
assert
(
name
);
assert
(
name
&&
*
name
);
if
((
entry
=
malloc
(
sizeof
(
*
entry
))))
{
script_entry_append
(
script
,
&
entry
->
entry
,
...
...
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