Check that supplied facility is not bigger than LOG_NFACILITIES.
PR: bin/79260 Submitted by: Shuichi KITAGUCHI
This commit is contained in:
parent
63575b5712
commit
b4e852907f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=144218
@ -916,6 +916,13 @@ logmsg(int pri, const char *msg, const char *from, int flags)
|
||||
fac = LOG_NFACILITIES;
|
||||
else
|
||||
fac = LOG_FAC(pri);
|
||||
|
||||
/* Check maximum facility number. */
|
||||
if (fac > LOG_NFACILITIES) {
|
||||
(void)sigsetmask(omask);
|
||||
return;
|
||||
}
|
||||
|
||||
prilev = LOG_PRI(pri);
|
||||
|
||||
/* extract program name */
|
||||
|
Loading…
Reference in New Issue
Block a user