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
9d0676e7
Commit
9d0676e7
authored
Jan 28, 2015
by
harshad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for buffer limit in loading string
parent
b0f37f22
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ogórek.go
ogórek.go
+3
-3
No files found.
ogórek.go
View file @
9d0676e7
...
@@ -422,7 +422,7 @@ func decodeStringEscape(b []byte) string {
...
@@ -422,7 +422,7 @@ func decodeStringEscape(b []byte) string {
// Push a string
// Push a string
func
(
d
*
Decoder
)
loadString
()
error
{
func
(
d
*
Decoder
)
loadString
()
error
{
line
,
_
,
err
:=
d
.
r
.
ReadLine
(
)
line
,
err
:=
d
.
r
.
ReadBytes
(
'\n'
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
@@ -437,11 +437,11 @@ func (d *Decoder) loadString() error {
...
@@ -437,11 +437,11 @@ func (d *Decoder) loadString() error {
return
fmt
.
Errorf
(
"invalid string delimiter: %c"
,
line
[
0
])
return
fmt
.
Errorf
(
"invalid string delimiter: %c"
,
line
[
0
])
}
}
if
line
[
len
(
line
)
-
1
]
!=
delim
{
if
line
[
len
(
line
)
-
2
]
!=
delim
{
return
fmt
.
Errorf
(
"insecure string"
)
return
fmt
.
Errorf
(
"insecure string"
)
}
}
d
.
push
(
decodeStringEscape
(
line
[
1
:
len
(
line
)
-
1
]))
d
.
push
(
decodeStringEscape
(
line
[
1
:
len
(
line
)
-
2
]))
return
nil
return
nil
}
}
...
...
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