Merge "Do not write past end of inotify event structure." into sc-v2-dev am: ba622485ee

Original change: https://googleplex-android-review.googlesource.com/c/platform/bootable/recovery/+/16034934

Change-Id: I1065f618dadd19fba93c39559881f2378dd9b8e3