Commit 25a2da3
committed
Fix null pointer bug for IP packet headers
Sessions where registered before they were fully populated.
In some cases, that could plausibly allow them to be handled
by the NIO thread before their lastIP/TCP header values were
set. In that case, if a response was sufficiently fast (e.g.
there was an immediate error) then the NIO thread crashed
trying to get the last IP header details of the session to
write a response. We now ensure everything is 100% set up
before we register the NIO channel.1 parent 070830e commit 25a2da3
File tree
3 files changed
+12
-10
lines changed- app/src/main/java/tech/httptoolkit/android
- vpn
3 files changed
+12
-10
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
105 | 107 | | |
106 | 108 | | |
107 | 109 | | |
| |||
112 | 114 | | |
113 | 115 | | |
114 | 116 | | |
115 | | - | |
| 117 | + | |
116 | 118 | | |
117 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
118 | 123 | | |
119 | 124 | | |
120 | 125 | | |
| |||
380 | 385 | | |
381 | 386 | | |
382 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
383 | 393 | | |
384 | 394 | | |
385 | 395 | | |
| |||
Lines changed: 0 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | 56 | | |
63 | 57 | | |
64 | 58 | | |
| |||
159 | 153 | | |
160 | 154 | | |
161 | 155 | | |
162 | | - | |
163 | 156 | | |
164 | 157 | | |
165 | 158 | | |
| |||
205 | 198 | | |
206 | 199 | | |
207 | 200 | | |
208 | | - | |
209 | 201 | | |
210 | 202 | | |
211 | 203 | | |
| |||
0 commit comments