Repository navigation
Commit e31df4a
committed
Custom BIO_java_bytebuffer write callback over-reports bytes written, violating the BIO_write contract
Motivation:
Our custom BIO_java_bytebuffer write callback internally flushes queued bytes but made the mistake to also account for these in the return value of the callback. This is incorrect as a caller to BIO_write(...) will use the return value to detect how much of the input buffer data was consumed.
Modifications:
Don't account for the flushed data in the returned value
Result:
Correctly implement the write callback1 parent 865531f commit e31df4a
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
229 | 236 | | |
230 | 237 | | |
231 | 238 | | |
| |||
239 | 246 | | |
240 | 247 | | |
241 | 248 | | |
242 | | - | |
| 249 | + | |
243 | 250 | | |
244 | 251 | | |
245 | 252 | | |
| |||
0 commit comments