Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
31747fe7
...
31747fe7321c8e695f34396977fea9659fc34235
authored
2004-12-23 16:59:08 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(_auth_lb_writelines): Bugfix
1 parent
ea55eed9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
auth/lbuf.c
auth/lbuf.c
View file @
31747fe
...
...
@@ -123,9 +123,11 @@ _auth_lb_writelines (struct _line_buffer *s, const char *iptr, size_t isize,
{
char
*
start
,
*
end
;
for
(
start
=
s
->
buffer
,
end
=
strchr
(
start
,
'\n'
);
for
(
start
=
s
->
buffer
,
end
=
memchr
(
start
,
'\n'
,
s
->
buffer
+
s
->
level
-
start
);
end
&&
end
<
s
->
buffer
+
s
->
level
;
start
=
end
+
1
,
end
=
strchr
(
start
,
'\n'
))
start
=
end
+
1
,
end
=
memchr
(
start
,
'\n'
,
s
->
buffer
+
s
->
level
-
start
))
if
(
end
[
-
1
]
==
'\r'
)
{
int
rc
=
wr
(
data
,
start
,
end
);
...
...
@@ -137,7 +139,7 @@ _auth_lb_writelines (struct _line_buffer *s, const char *iptr, size_t isize,
{
if
(
start
<
s
->
buffer
+
s
->
level
)
{
int
rest
=
s
->
buffer
+
s
->
level
-
start
+
1
;
int
rest
=
s
->
buffer
+
s
->
level
-
start
;
memmove
(
s
->
buffer
,
start
,
rest
);
s
->
level
=
rest
;
}
...
...
Please
register
or
sign in
to post a comment