Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
b46cf57d
Commit
b46cf57d
authored
Jul 07, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
event/BufferedSocket: OnSocketReady() returns true after close
Fixes use-after-free bug (
https://bugs.musicpd.org/view.php?id=4548
).
parent
6f59d71e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
NEWS
NEWS
+1
-0
BufferedSocket.cxx
src/event/BufferedSocket.cxx
+7
-1
No files found.
NEWS
View file @
b46cf57d
...
...
@@ -5,6 +5,7 @@ ver 0.19.17 (not yet released)
* fix spurious seek error "Failed to allocate silence buffer"
* replay gain: fix "replay_gain_handler mixer" setting
* DSD: use 0x69 as silence pattern
* fix use-after-free bug on "close"
ver 0.19.16 (2016/06/13)
* faster seeking
...
...
src/event/BufferedSocket.cxx
View file @
b46cf57d
...
...
@@ -118,9 +118,15 @@ BufferedSocket::OnSocketReady(unsigned flags)
if
(
flags
&
READ
)
{
assert
(
!
input
.
IsFull
());
if
(
!
ReadToBuffer
()
||
!
ResumeInput
()
)
if
(
!
ReadToBuffer
())
return
false
;
if
(
!
ResumeInput
())
/* we must return "true" here or
SocketMonitor::Dispatch() will call
Cancel() on a freed object */
return
true
;
if
(
!
input
.
IsFull
())
ScheduleRead
();
}
...
...
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