diff options
| author | Shell <[email protected]> | 2024-03-02 16:05:19 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-03-02 16:05:19 +0800 |
| commit | 53754ff50acfba0ef4ebae21150b49762c5919ef (patch) | |
| tree | 43454a346200dfb971449588b7a74f82460756ac /libcpu/aarch64/common/setup.c | |
| parent | 00c6800e4e532b6996bc9cb3ce0e8e4cffed2245 (diff) | |
[fixup] check NULL pointer before access (#8573)
Signed-off-by: Shell <[email protected]>
Diffstat (limited to 'libcpu/aarch64/common/setup.c')
| -rw-r--r-- | libcpu/aarch64/common/setup.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libcpu/aarch64/common/setup.c b/libcpu/aarch64/common/setup.c index 7f02b79869..a7bcd26070 100644 --- a/libcpu/aarch64/common/setup.c +++ b/libcpu/aarch64/common/setup.c @@ -390,8 +390,10 @@ void rt_hw_common_setup(void) for (int i = 0; i < mem_region_nr; ++i, ++mem_region) { - if (mem_region != page_region) + if (mem_region != page_region && mem_region->name) { + mem_region->start -= PV_OFFSET; + mem_region->end -= PV_OFFSET; rt_page_install(*mem_region); } } |
