summaryrefslogtreecommitdiff
path: root/scripts/mkcompile_h
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2022-07-30 20:36:34 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2022-08-03 16:58:10 +0300
commit125ed24a4ab0d704bab5dee5ccb2c3b05f627c78 (patch)
tree82a7e0f4e2880d7219ad494c7abc71a2c7e241b8 /scripts/mkcompile_h
parent36b0f0deed4fcbe9ff31268e6c3554714e4d2387 (diff)
downloadlinux-125ed24a4ab0d704bab5dee5ccb2c3b05f627c78.tar.xz
modpost: add array range check to sec_name()
The section index is always positive, so the argument, secindex, should be unsigned. Also, inserted the array range check. If sym->st_shndx is a special section index (between SHN_LORESERVE and SHN_HIRESERVE), there is no corresponding section header. For example, if a symbol specifies an absolute value, sym->st_shndx is SHN_ABS (=0xfff1). The current users do not cause the out-of-range access of info->sechddrs[], but it is better to avoid such a pitfall. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/mkcompile_h')
0 files changed, 0 insertions, 0 deletions