elog: Check for large data when adding an event
This adds a check to ensure the data supplied by the user does not
cause the total event size to exceed the allowable length, which is
defined as 1 byte by SMBIOS.
TEST=Ran "mosys eventlog add" fails gracefully when exceedingly
large data payload is supplied (see below):
$ mosys eventlog add 0 `yes '1'|head -494|tr -d '\n'`
Event data size 247 too large.
Signed-off-by: David Hendricks <firstname.lastname@example.org>
Reviewed-by: Shawn N <email@example.com>
1 file changed