Vladimir Serbinenko ae69b464be lib/relocator: Fix dereference after NULL check
In the function free_subchunk(), after checking that subchu->post isn't NULL,
grub_memset() is called on subchu->pre->freebytes but it should be called on
subchu->post->freebytes. If subchu->pre is NULL but subchu->post isn't NULL,
then this could lead to a NULL pointer dereference.

Fixes: CID 473882

Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Signed-off-by: Alec Brown <alec.r.brown@oracle.com>
Reviewed-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2025-11-20 17:28:00 +01:00
..
2011-05-13 16:36:05 +02:00
2017-05-08 20:53:28 +02:00
2010-08-30 00:54:15 +02:00
2024-11-28 21:50:53 +01:00
2021-12-23 01:05:34 +01:00
2019-02-25 11:28:44 +01:00
2016-10-27 16:22:06 +02:00
2022-03-14 15:47:13 +01:00
2011-07-05 20:24:20 +02:00
2012-02-26 18:09:07 +01:00
2022-03-14 15:47:13 +01:00
2013-12-18 05:28:05 +01:00
2016-02-12 12:39:38 +01:00
2023-05-17 12:51:50 +02:00