2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Return EINVAL if errnum > sys_nerr

This commit is contained in:
Todd C. Miller
2001-12-14 19:56:48 +00:00
parent 152e745d71
commit e0315c59ea

View File

@@ -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.
*
* Redistribution and use in source and binary forms, with or without
@@ -51,6 +51,6 @@ strerror(n)
if (n > 0 && n < sys_nerr)
return(sys_errlist[n]);
else
return("Unknown error");
errno = EINVAL;
return("Unknown error");
}