Discussion:
[PATCH] Add and use xmmap.
(too old to reply)
enh
2017-05-24 00:38:40 UTC
Permalink
Raw Message
Everyone forgets that mmap returns MAP_FAILED rather than NULL on failure.
Every use of mmap in toybox was either doing the wrong check, or no check
at all (including the two I personally added).
---
lib/lib.h | 1 +
lib/xwrap.c | 7 ++
toys/android/load_policy.c | 6 +-
toys/other/hexedit.c | 2 +-
toys/other/modinfo.c | 4 +-
toys/pending/mdev.c | 175 ++++++++++++++++++++++-----------------------
toys/posix/file.c | 3 +-
7 files changed, 102 insertions(+), 96 deletions(-)

Loading...