if there are leading zeros fail the lookup
Pointed out by: Alexander Viro <viro@math.psu.edu>
This commit is contained in:
parent
8d107d1210
commit
70cb8de9ba
@ -198,6 +198,11 @@ fdesc_lookup(ap)
|
|||||||
}
|
}
|
||||||
|
|
||||||
fd = 0;
|
fd = 0;
|
||||||
|
/* the only time a leading 0 is acceptable is if it's "0" */
|
||||||
|
if (*pname == '0' && nlen != 1) {
|
||||||
|
error = ENOENT;
|
||||||
|
goto bad;
|
||||||
|
}
|
||||||
while (nlen--) {
|
while (nlen--) {
|
||||||
if (*pname < '0' || *pname > '9') {
|
if (*pname < '0' || *pname > '9') {
|
||||||
error = ENOENT;
|
error = ENOENT;
|
||||||
|
@ -198,6 +198,11 @@ fdesc_lookup(ap)
|
|||||||
}
|
}
|
||||||
|
|
||||||
fd = 0;
|
fd = 0;
|
||||||
|
/* the only time a leading 0 is acceptable is if it's "0" */
|
||||||
|
if (*pname == '0' && nlen != 1) {
|
||||||
|
error = ENOENT;
|
||||||
|
goto bad;
|
||||||
|
}
|
||||||
while (nlen--) {
|
while (nlen--) {
|
||||||
if (*pname < '0' || *pname > '9') {
|
if (*pname < '0' || *pname > '9') {
|
||||||
error = ENOENT;
|
error = ENOENT;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user