Don't allow dev_stdclone(9) to accept minors larger than the system is
able to handle (0xffffff).
This commit is contained in:
parent
69bbb5b1c7
commit
dab3d85fd7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104523
@ -436,6 +436,8 @@ dev_stdclone(char *name, char **namep, const char *stem, int *unit)
|
||||
u *= 10;
|
||||
u += name[i++] - '0';
|
||||
}
|
||||
if (u > 0xffffff)
|
||||
return (0);
|
||||
*unit = u;
|
||||
if (namep)
|
||||
*namep = &name[i];
|
||||
|
Loading…
Reference in New Issue
Block a user