Skip to content

Commit

Permalink
Merge pull request #16958 from opensourcerouting/calloc-warning-fix
Browse files Browse the repository at this point in the history
lib: fix calloc warning on recent compiler
  • Loading branch information
Jafaral authored Sep 30, 2024
2 parents a8482db + 660146b commit 237152f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/elf_py.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 237152f

Please sign in to comment.