Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
og-rek
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
og-rek
Commits
51c8a115
Commit
51c8a115
authored
Mar 01, 2017
by
Kamil Kisiel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix panic in loadString
parent
e3ff867d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
ogorek.go
ogorek.go
+5
-1
ogorek_test.go
ogorek_test.go
+1
-0
No files found.
ogorek.go
View file @
51c8a115
...
...
@@ -498,6 +498,10 @@ func (d *Decoder) loadString() error {
return
err
}
if
len
(
line
)
<
2
{
return
io
.
ErrUnexpectedEOF
}
var
delim
byte
switch
line
[
0
]
{
case
'\'
'
:
...
...
@@ -508,7 +512,7 @@ func (d *Decoder) loadString() error {
return
fmt
.
Errorf
(
"invalid string delimiter: %c"
,
line
[
0
])
}
if
l
en
(
line
)
<
2
||
l
ine
[
len
(
line
)
-
1
]
!=
delim
{
if
line
[
len
(
line
)
-
1
]
!=
delim
{
return
io
.
ErrUnexpectedEOF
}
...
...
ogorek_test.go
View file @
51c8a115
...
...
@@ -259,6 +259,7 @@ func TestMemoOpCode(t *testing.T) {
func
TestFuzzCrashers
(
t
*
testing
.
T
)
{
crashers
:=
[]
string
{
"(dS''
\n
(lc
\n\n
a2a2a22aasS''
\n
a"
,
"S
\n
"
,
}
for
_
,
c
:=
range
crashers
{
...
...
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