Commit 3cc8fca
crypto: handle i2d_SSL_SESSION() error return
i2d_SSL_SESSION() can return a value <= 0 when the session is malformed
or otherwise invalid. Handle that case.
This change comes without a regression test because I couldn't figure
out a good way to generate an existing but invalid session in a timely
fashion.
Fixes: #29202
PR-URL: #29225
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent ff6330a commit 3cc8fca
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2317 | 2317 | | |
2318 | 2318 | | |
2319 | 2319 | | |
2320 | | - | |
| 2320 | + | |
| 2321 | + | |
2321 | 2322 | | |
2322 | 2323 | | |
2323 | 2324 | | |
2324 | | - | |
| 2325 | + | |
2325 | 2326 | | |
2326 | 2327 | | |
2327 | 2328 | | |
| |||
0 commit comments