mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-03 15:55:40 +00:00
Return EINVAL if errnum > sys_nerr
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1999 Todd C. Miller <Todd.Miller@courtesan.com>
|
* Copyright (c) 1999, 2001 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -51,6 +51,6 @@ strerror(n)
|
|||||||
|
|
||||||
if (n > 0 && n < sys_nerr)
|
if (n > 0 && n < sys_nerr)
|
||||||
return(sys_errlist[n]);
|
return(sys_errlist[n]);
|
||||||
else
|
errno = EINVAL;
|
||||||
return("Unknown error");
|
return("Unknown error");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user