Repository navigation
Commit a879c85
committed
Decoding of the SNI server_name allow to embed NUL Character
Motivation:
We incorrectly used NewStringUTF(...) to construct the java string which uses modified UTF-8 and so could result in have embed NUL chars. We need to ensure we re-construct the java string from the byte array to ensure nothing is re-interpreted.
Modifications:
Replace use of NewStringUTF(...) with tcn_new_stringn(...) which is the correct thing to use when creating a String from raw bytes received on the wire.
Result:
Correct converting of SNI server_name to java string1 parent 92dd66f commit a879c85
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2612 | 2612 | | |
2613 | 2613 | | |
2614 | 2614 | | |
2615 | | - | |
| 2615 | + | |
2616 | 2616 | | |
2617 | 2617 | | |
2618 | 2618 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2616 | 2616 | | |
2617 | 2617 | | |
2618 | 2618 | | |
2619 | | - | |
| 2619 | + | |
2620 | 2620 | | |
2621 | 2621 | | |
2622 | 2622 | | |
| |||
0 commit comments