Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
varnishevent
Commits
b07b7515
Commit
b07b7515
authored
Sep 30, 2015
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix an off-by-one error for resizing the output buffer in FMT_Format()
parent
ed34e282
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
format.c
src/format.c
+3
-1
No files found.
src/format.c
View file @
b07b7515
...
...
@@ -1488,8 +1488,9 @@ FMT_Format(tx_t *tx, size_t *curlen)
tx
->
state
=
TX_FORMATTING
;
/* Start curlen at 1, because we'll be appending a NUL byte */
*
p
=
'\0'
;
*
curlen
=
0
;
*
curlen
=
1
;
for
(
int
i
=
0
;
i
<
fmt
.
n
;
i
++
)
{
char
*
s
=
NULL
;
size_t
len
=
0
;
...
...
@@ -1511,6 +1512,7 @@ FMT_Format(tx_t *tx, size_t *curlen)
}
}
*
p
=
'\0'
;
*
curlen
-=
1
;
assert
(
tx
->
state
==
TX_FORMATTING
);
tx
->
state
=
TX_WRITTEN
;
...
...
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