nul_terminator: track when strings have a NUL terminator
commitb61f6ed25d1f8b28929f80e5e3fff837ced99814
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 23 Oct 2018 13:10:19 +0000 (23 16:10 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Tue, 23 Oct 2018 13:10:19 +0000 (23 16:10 +0300)
tree3ed69a5da5d7bec9a11c0b3fc0b754e6e3932314
parent04df2b86459099d86d234fd5d43132664a282fbf
nul_terminator: track when strings have a NUL terminator

This code is very very incomplete and I haven't really tested it.  But I
will expand it later.

It's supposed to track if a string is known to be NUL terminated or known
to be not NUL terminated.  My guess is that it's only manual annotation of
places which are dangerous which will mark the string as non-terminated.
So like copy_from_user() will mark the string as non-NUL terminated.

Anyway, I have some places where this will be useful right off the bat so
I am going to commit it as-is for now.  We'll see how it evolves in the
future.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Makefile
check_list.h
smatch_nul_terminator.c [new file with mode: 0644]