Browse Source

Fix occasional buffer overflow on TLS connections

Closes #16
tags/v1.1.1^0
Chris Smith 5 years ago
parent
commit
cd293318a5

+ 4
- 0
CHANGELOG.adoc View File

3
 == Next version (in development)
3
 == Next version (in development)
4
 * No changes yet
4
 * No changes yet
5
 
5
 
6
+== v1.1.1 (2019-03-14)
7
+
8
+* Fix occasional buffer overflow issue on TLS connections.
9
+
6
 == v1.1.0 (2019-03-13)
10
 == v1.1.0 (2019-03-13)
7
 
11
 
8
 * Away support:
12
 * Away support:

+ 1
- 1
build.gradle.kts View File

2
 import org.jetbrains.dokka.gradle.LinkMapping
2
 import org.jetbrains.dokka.gradle.LinkMapping
3
 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3
 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
4
 
4
 
5
-version = "1.1.0"
5
+version = "1.1.1"
6
 group = "com.dmdirc.ktirc"
6
 group = "com.dmdirc.ktirc"
7
 
7
 
8
 plugins {
8
 plugins {

+ 1
- 1
docs/index.adoc View File

1
 = KtIrc {version}
1
 = KtIrc {version}
2
 Chris Smith
2
 Chris Smith
3
-:version: 1.1.0
3
+:version: 1.1.1
4
 :toc: left
4
 :toc: left
5
 :toc-position: left
5
 :toc-position: left
6
 :toclevels: 5
6
 :toclevels: 5

+ 2
- 2
src/main/kotlin/com/dmdirc/ktirc/io/Buffers.kt View File

3
 import kotlinx.io.pool.DefaultPool
3
 import kotlinx.io.pool.DefaultPool
4
 import java.nio.ByteBuffer
4
 import java.nio.ByteBuffer
5
 
5
 
6
-private const val BUFFER_SIZE = 32768
7
-private const val MAXIMUM_POOL_SIZE = 1024
6
+internal const val BUFFER_SIZE = 32768
7
+internal const val MAXIMUM_POOL_SIZE = 1024
8
 
8
 
9
 internal val byteBufferPool = ByteBufferPool(MAXIMUM_POOL_SIZE, BUFFER_SIZE)
9
 internal val byteBufferPool = ByteBufferPool(MAXIMUM_POOL_SIZE, BUFFER_SIZE)
10
 
10
 

+ 1
- 1
src/main/kotlin/com/dmdirc/ktirc/io/Tls.kt View File

53
             useClientMode = true
53
             useClientMode = true
54
         }
54
         }
55
 
55
 
56
-        incomingNetBuffer = ByteBuffer.allocate(engine.session.packetBufferSize)
56
+        incomingNetBuffer = ByteBuffer.allocate(engine.session.packetBufferSize + BUFFER_SIZE)
57
         outgoingAppBuffers = Channel(capacity = Channel.UNLIMITED)
57
         outgoingAppBuffers = Channel(capacity = Channel.UNLIMITED)
58
         incomingAppBuffer = ByteBuffer.allocate(engine.session.applicationBufferSize)
58
         incomingAppBuffer = ByteBuffer.allocate(engine.session.applicationBufferSize)
59
 
59
 

Loading…
Cancel
Save