mirror of
https://github.com/openharmony/kernel_linux_common_modules.git
synced 2026-08-27 09:41:18 -04:00
!153 kasan 压测时code_sign 出现string内存越界
Merge pull request !153 from tujingwei/OpenHarmony-5.0.1-Release
This commit is contained in:
@@ -213,7 +213,7 @@ int parse_cert_source(unsigned long args, struct cert_source **_source)
|
||||
goto copy_source_failed;
|
||||
}
|
||||
|
||||
source->subject = kzalloc(info.signing_length, GFP_KERNEL);
|
||||
source->subject = kzalloc(info.signing_length + 1, GFP_KERNEL);
|
||||
if (!source->subject) {
|
||||
ret = -ENOMEM;
|
||||
goto copy_source_failed;
|
||||
@@ -225,7 +225,7 @@ int parse_cert_source(unsigned long args, struct cert_source **_source)
|
||||
goto copy_subject_failed;
|
||||
}
|
||||
|
||||
source->issuer = kzalloc(info.issuer_length, GFP_KERNEL);
|
||||
source->issuer = kzalloc(info.issuer_length + 1, GFP_KERNEL);
|
||||
if (!source->issuer) {
|
||||
ret = -ENOMEM;
|
||||
goto copy_subject_failed;
|
||||
|
||||
Reference in New Issue
Block a user