Merge pull request #16958 from opensourcerouting/calloc-warning-fix

lib: fix calloc warning on recent compiler
This commit is contained in:
Jafar Al-Gharaibeh 2024-09-30 12:42:12 -05:00 committed by GitHub
commit 237152fcb5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1307,7 +1307,7 @@ static PyObject *elffile_load(PyTypeObject *type, PyObject *args,
}
#endif
w->sects = calloc(sizeof(PyObject *), w->ehdr->e_shnum);
w->sects = calloc(w->ehdr->e_shnum, sizeof(PyObject *));
w->n_sect = w->ehdr->e_shnum;
return (PyObject *)w;