-
-
usr/src/lib/libbsm/common/au_preselect.c (Diff revision 1) (void *) should not need type cast, or if you feel like to keep those, you can move assignment out of if statement and win in readability:)
11826 Fix resizing of audit event map
Review Request #2400 — Created Oct. 17, 2019 and submitted
Information | |
---|---|
mscheler | |
illumos-gate | |
11826 | |
Reviewers | |
general | |
Fix obvious memory allocation errors (famous last words)
I've run a nightly and booted a system into the a BE with the new packages. I've made sure that the "newgrp" command (which is linked against "libbsm") still works.
I'm open to suggestions for better testing.
-
-
usr/src/lib/libbsm/common/au_preselect.c (Diff revision 1) Have you considered switching to
reallocarray()
here too to protect against overflows?
-
-
usr/src/lib/libbsm/common/au_preselect.c (Diff revision 2) Since you're modifying this, would you mind putting braces around this if statement since it's body is a multi-line continuation.
-
usr/src/lib/libbsm/common/au_preselect.c (Diff revision 2) Shouldn't this be '<=' rather than just '<'?
-
usr/src/lib/libbsm/common/au_preselect.c (Diff revision 2) Should we consider using recallocarray as opposed to reallocarray so that way if other software ends up making the mistake of going beyond the valid counts, we end up with zeroed data rather than random heap garbage?