]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix potential NULL pointer dereference in final_maxfragmentlen()
authorAndrey Tsygunka <aitsygunka@yandex.ru>
Fri, 4 Apr 2025 11:58:40 +0000 (14:58 +0300)
committerMatt Caswell <matt@openssl.org>
Mon, 14 Apr 2025 14:52:53 +0000 (15:52 +0100)
commit28de1f5004c1083d358e6934552124a201e0251e
treeffeef1dcd87a2cd272a71818df7e4ae7df8f4690
parent1a81d509a001607e40eb49174fa555068bdf7c48
Fix potential NULL pointer dereference in final_maxfragmentlen()

In the final_maxfragmentlen() function, s->session is checked
for NULL after it was dereferenced earlier.
So move this NULL check to the top of the function.

CLA: trivial

Fixes: fa49560451 (Fix handling of max_fragment_length extension for PSK)
Signed-off-by: Andrey Tsygunka <aitsygunka@yandex.ru>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
(Merged from https://github.com/openssl/openssl/pull/27272)
ssl/statem/extensions.c