Pārlūkot izejas kodu

!310 [libcpu][aarch64] fix out-of-bounds memory access in .L__clean_bss_loop
Merge pull request !310 from LuoYong/rt-smart

bernard 4 gadi atpakaļ
vecāks
revīzija
e1a4fdd3ce
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      libcpu/aarch64/cortex-a/entry_point.S

+ 1 - 1
libcpu/aarch64/cortex-a/entry_point.S

@@ -95,7 +95,7 @@ __start:
 .L__clean_bss_loop:
 .L__clean_bss_loop:
     cbz     w2, .L__jump_to_entry
     cbz     w2, .L__jump_to_entry
     str     xzr, [x1], #8
     str     xzr, [x1], #8
-    sub     w2, w2, #1
+    sub     w2, w2, #8
     cbnz    w2, .L__clean_bss_loop
     cbnz    w2, .L__clean_bss_loop
 
 
 .L__jump_to_entry:          /* jump to C code, should not return */        
 .L__jump_to_entry:          /* jump to C code, should not return */