Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nettle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dmitry Baryshkov
nettle
Commits
dd83950b
Commit
dd83950b
authored
Feb 16, 2016
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
Fix sexp-conv assertion failure, reported by Hanno Böck.
parent
84c96c59
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ChangeLog
+5
-0
5 additions, 0 deletions
ChangeLog
tools/input.c
+40
-41
40 additions, 41 deletions
tools/input.c
with
45 additions
and
41 deletions
ChangeLog
+
5
−
0
View file @
dd83950b
2016-02-16 Niels Möller <nisse@lysator.liu.se>
2016-02-16 Niels Möller <nisse@lysator.liu.se>
* tools/input.c (sexp_get_string_length): Process advanced string
syntax only when in advanced mode. Fixes an assertion failure
reported by Hanno Böck, for input where advanced syntax is
improperly wrapped inside transport syntax.
* tools/parse.c (sexp_parse): Fail with an error message for
* tools/parse.c (sexp_parse): Fail with an error message for
unexpected ']' characters. Fixes crash reported by Hanno Böck.
unexpected ']' characters. Fixes crash reported by Hanno Böck.
Also handle SEXP_DISPLAY (internal error) explicitly, without a
Also handle SEXP_DISPLAY (internal error) explicitly, without a
...
...
This diff is collapsed.
Click to expand it.
tools/input.c
+
40
−
41
View file @
dd83950b
...
@@ -286,9 +286,7 @@ sexp_get_string_length(struct sexp_input *input, enum sexp_mode mode,
...
@@ -286,9 +286,7 @@ sexp_get_string_length(struct sexp_input *input, enum sexp_mode mode,
}
}
}
}
switch
(
input
->
c
)
if
(
input
->
c
==
':'
)
{
case
':'
:
/* Verbatim */
/* Verbatim */
for
(;
length
;
length
--
)
for
(;
length
;
length
--
)
{
{
...
@@ -296,12 +294,13 @@ sexp_get_string_length(struct sexp_input *input, enum sexp_mode mode,
...
@@ -296,12 +294,13 @@ sexp_get_string_length(struct sexp_input *input, enum sexp_mode mode,
sexp_push_char
(
input
,
string
);
sexp_push_char
(
input
,
string
);
}
}
break
;
else
if
(
mode
!=
SEXP_ADVANCED
)
die
(
"Encountered advanced string in canonical mode.
\n
"
);
else
switch
(
input
->
c
)
{
case
'"'
:
case
'"'
:
if
(
mode
!=
SEXP_ADVANCED
)
die
(
"Encountered quoted string in canonical mode.
\n
"
);
for
(;
length
;
length
--
)
for
(;
length
;
length
--
)
if
(
sexp_get_quoted_char
(
input
))
if
(
sexp_get_quoted_char
(
input
))
sexp_push_char
(
input
,
string
);
sexp_push_char
(
input
,
string
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment