dtlogin: Coverity (memory corruption, moderate)

This commit is contained in:
Jon Trulson
2014-12-26 16:55:46 -07:00
parent 235a75c03c
commit b881408be0
4 changed files with 19 additions and 14 deletions

View File

@@ -49,6 +49,7 @@
# include <sys/types.h>
# include <sys/signal.h>
# include <setjmp.h>
# include <errno.h>
# include <pwd.h>
# include "dm.h"
# include "vgmsg.h"
@@ -101,7 +102,7 @@ static const char *
_SysErrorMsg( int n )
{
const char *s = ((n >= 0 && n < sys_nerr) ? sys_errlist[n] : "unknown error");
const char *s = strerror(n);
return (s ? s : "no such error");
}