summaryrefslogtreecommitdiff
path: root/aide-0.16-crash-elf.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-08-05 01:32:28 +0000
committerCoprDistGit <infra@openeuler.org>2024-08-05 01:32:28 +0000
commit12230b9c3bee3fcb1ded5f13651cc9b727fee0b9 (patch)
treefcc22946609eb505eadb3fb5cfcea61369a50d2c /aide-0.16-crash-elf.patch
parent1a6922a62e4499756fe055879eaf9d73627a89f9 (diff)
automatic import of aideopeneuler24.03_LTS
Diffstat (limited to 'aide-0.16-crash-elf.patch')
-rw-r--r--aide-0.16-crash-elf.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/aide-0.16-crash-elf.patch b/aide-0.16-crash-elf.patch
new file mode 100644
index 0000000..5aa3472
--- /dev/null
+++ b/aide-0.16-crash-elf.patch
@@ -0,0 +1,17 @@
+--- ./src/do_md.c 2018-03-19 05:10:19.994957024 -0400
++++ ./src/do_md.c 2018-03-19 05:19:05.829957024 -0400
+@@ -135,8 +135,13 @@
+ continue;
+
+ while (!bingo && (data = elf_getdata (scn, data)) != NULL) {
+- int maxndx = data->d_size / shdr.sh_entsize;
++ int maxndx;
+ int ndx;
++
++ if (shdr.sh_entsize != 0)
++ maxndx = data->d_size / shdr.sh_entsize;
++ else
++ continue;
+
+ for (ndx = 0; ndx < maxndx; ++ndx) {
+ (void) gelf_getdyn (data, ndx, &dyn);