From ea4ed9a3e91062ebebcfb1f4bfb2eca2d896bbb2 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 07:32:57 +0000 Subject: Apply patch aide-0.16-crash-elf.patch patch_name: aide-0.16-crash-elf.patch present_in_specfile: true location_in_specfile: 6 --- diff --git a/src/do_md.c b/src/do_md.c index 98af93e..77d2e15 100644 --- a/src/do_md.c +++ b/src/do_md.c @@ -101,8 +101,13 @@ int is_prelinked(int fd) { 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);