Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
c78b9fed
Commit
c78b9fed
authored
Aug 15, 2015
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bug in parse_xml(). It failed to check if the given input stream was
valid before trying to parse it.
parent
ecdfdea6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
xml_parser_kernel_1.h
dlib/xml_parser/xml_parser_kernel_1.h
+8
-0
xml_parser_kernel_abstract.h
dlib/xml_parser/xml_parser_kernel_abstract.h
+4
-5
No files found.
dlib/xml_parser/xml_parser_kernel_1.h
View file @
c78b9fed
...
...
@@ -1412,6 +1412,8 @@ namespace dlib
error_handler
&
eh
)
{
if
(
!
in
)
throw
xml_parse_error
(
"Unexpected end of file during xml parsing."
);
xml_parser
parser
;
parser
.
add_document_handler
(
dh
);
parser
.
add_error_handler
(
eh
);
...
...
@@ -1424,6 +1426,8 @@ namespace dlib
document_handler
&
dh
)
{
if
(
!
in
)
throw
xml_parse_error
(
"Unexpected end of file during xml parsing."
);
xml_parser
parser
;
parser
.
add_document_handler
(
dh
);
parser
.
add_error_handler
(
eh
);
...
...
@@ -1435,6 +1439,8 @@ namespace dlib
error_handler
&
eh
)
{
if
(
!
in
)
throw
xml_parse_error
(
"Unexpected end of file during xml parsing."
);
xml_parser
parser
;
parser
.
add_error_handler
(
eh
);
parser
.
parse
(
in
);
...
...
@@ -1445,6 +1451,8 @@ namespace dlib
document_handler
&
dh
)
{
if
(
!
in
)
throw
xml_parse_error
(
"Unexpected end of file during xml parsing."
);
xml_parser
parser
;
parser
.
add_document_handler
(
dh
);
impl
::
default_xml_error_handler
eh
;
...
...
dlib/xml_parser/xml_parser_kernel_abstract.h
View file @
c78b9fed
...
...
@@ -223,7 +223,7 @@ namespace dlib
supplied error_handler and document_handler.
throws
- xml_parse_error
Thrown if there is a problem
open
ing the input file.
Thrown if there is a problem
pars
ing the input file.
!*/
void
parse_xml
(
...
...
@@ -237,7 +237,7 @@ namespace dlib
supplied error_handler and document_handler.
throws
- xml_parse_error
Thrown if there is a problem
open
ing the input file.
Thrown if there is a problem
pars
ing the input file.
!*/
void
parse_xml
(
...
...
@@ -250,7 +250,7 @@ namespace dlib
supplied error_handler.
throws
- xml_parse_error
Thrown if there is a problem
open
ing the input file.
Thrown if there is a problem
pars
ing the input file.
!*/
void
parse_xml
(
...
...
@@ -265,8 +265,7 @@ namespace dlib
if a fatal parsing error is encountered.
throws
- xml_parse_error
Thrown if a fatal parsing error is encountered or if there is a problem
opening the input file.
Thrown if there is a problem parsing the input file.
!*/
// ----------------------------------------------------------------------------------------
...
...
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