summaryrefslogtreecommitdiffstats
path: root/lib/setproctitle.c
Commit message (Collapse)AuthorAgeFilesLines
* setproctitle: fix out of boundary accessTobias Stoeckmann2017-09-261-5/+6
| | | | | | | | | | | | | A program using setproctitle can trigger an out of boundary access if an attacker was able to clear the environment before execution. The check in setproctitle prevents overflows, but does not take into account that the whole length of the arguments could be 1, which is possible by supplying such a program name to execlp(3) or using a symbolic link, e.g. argv[0] = "l", argv[1] = NULL. Only login uses setproctitle, which is not affected by this problem due to initializing the environment right before the call.
* misc: never cast void* from malloc(3) and friendsRuediger Meier2016-03-071-1/+1
| | | | | | | | | | Such cast could hide serious compiler warnings in case we are missing includes (e.g. <stdlib.h> or "xalloc.h"). See http://stackoverflow.com/questions/605845/do-i-cast-the-result-of-malloc Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* lib: cleanup setproctitle.cKarel Zak2011-10-261-55/+20Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Imported from util-linux-2.9v tarball.Karel Zak2006-12-071-12/+4Star
|
* Imported from util-linux-2.9i tarball.Karel Zak2006-12-071-0/+117