Browse Source

Fix occasional buffer overflow on TLS connections

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

+ 4
- 0
CHANGELOG.adoc View File

@@ -3,6 +3,10 @@
3 3
 == Next version (in development)
4 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 10
 == v1.1.0 (2019-03-13)
7 11
 
8 12
 * Away support:

+ 1
- 1
build.gradle.kts View File

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

+ 1
- 1
docs/index.adoc View File

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

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

@@ -3,8 +3,8 @@ package com.dmdirc.ktirc.io
3 3
 import kotlinx.io.pool.DefaultPool
4 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 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,7 +53,7 @@ internal class TlsSocket(
53 53
             useClientMode = true
54 54
         }
55 55
 
56
-        incomingNetBuffer = ByteBuffer.allocate(engine.session.packetBufferSize)
56
+        incomingNetBuffer = ByteBuffer.allocate(engine.session.packetBufferSize + BUFFER_SIZE)
57 57
         outgoingAppBuffers = Channel(capacity = Channel.UNLIMITED)
58 58
         incomingAppBuffer = ByteBuffer.allocate(engine.session.applicationBufferSize)
59 59
 

Loading…
Cancel
Save