PR 29101
* libdep_plugin.c (get_libdeps): Check for overflow when computing
amount of memory to allocate.
+2022-05-03 Nick Clifton <nickc@redhat.com>
+
+ PR 29101
+ * libdep_plugin.c (get_libdeps): Check for overflow when computing
+ amount of memory to allocate.
+
2022-04-27 Nick Clifton <nickc@redhat.com>
PR 29006
arhdr ah;
int len;
unsigned long mlen;
+ size_t amt;
linerec *lr;
enum ld_plugin_status rc = LDPS_NO_SYMS;
lseek (fd, mlen, SEEK_CUR);
continue;
}
- lr = malloc (sizeof (linerec) + mlen);
+ amt = mlen + sizeof (linerec);
+ if (amt <= mlen)
+ return LDPS_ERR;
+ lr = malloc (amt);
if (!lr)
return LDPS_ERR;
lr->next = NULL;