Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cs744-project1-final
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Naman Dixit
cs744-project1-final
Commits
483a3ed0
Commit
483a3ed0
authored
Oct 26, 2019
by
Naman Dixit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIxed zero keys and values
parent
b3f73a53
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
common/xml.h
common/xml.h
+10
-0
No files found.
common/xml.h
View file @
483a3ed0
...
@@ -158,6 +158,11 @@ XML_Message xmlParseMessage (Char *xml) {
...
@@ -158,6 +158,11 @@ XML_Message xmlParseMessage (Char *xml) {
key_len
++
;
key_len
++
;
}
}
if
(
key_len
==
0
)
{
error_message
=
"Empty key"
;
goto
parse_failed
;
}
PARSE_CHAR
(
'<'
);
PARSE_CHAR
(
'<'
);
PARSE_SPACE
();
PARSE_SPACE
();
PARSE_CHAR
(
'/'
);
PARSE_CHAR
(
'/'
);
...
@@ -248,6 +253,11 @@ XML_Message xmlParseMessage (Char *xml) {
...
@@ -248,6 +253,11 @@ XML_Message xmlParseMessage (Char *xml) {
value_len
++
;
value_len
++
;
}
}
if
(
value_len
==
0
)
{
error_message
=
"Empty value"
;
goto
parse_failed
;
}
PARSE_CHAR
(
'<'
);
PARSE_CHAR
(
'<'
);
PARSE_SPACE
();
PARSE_SPACE
();
PARSE_CHAR
(
'/'
);
PARSE_CHAR
(
'/'
);
...
...
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