a few scan-build linter warnings
abuild-sudo.c:128:2: warning: The return value from the call to 'setuid' is not checked. If an error occurs in 'setuid', the following code may execute with unexpected privileges [security.insecureAPI.UncheckedReturn]
setuid(0);
^~~~~~
abuild-sudo.c:130:2: warning: The return value from the call to 'setgid' is not checked. If an error occurs in 'setgid', the following code may execute with unexpected privileges [security.insecureAPI.UncheckedReturn]
setgid(0);
^~~~~~
2 warnings generated.
abuild-tar.c:266:20: warning: Array access (via field 'ptr') results in a null pointer dereference [core.NullDereference]
b->ptr[b->size++] = '\n';
~~~ ^
1 warning generated.
fixing that
abuild-tar.c:224:2: warning: Null pointer passed as 1st argument to memory set function [unix.cstring.NullArg]
memset(b->ptr + oldsize, 0, newsize - oldsize);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~