diff options
Diffstat (limited to 'fs/devpts/root.c')
-rw-r--r-- | fs/devpts/root.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/devpts/root.c b/fs/devpts/root.c index 9b5408235..5b5948e80 100644 --- a/fs/devpts/root.c +++ b/fs/devpts/root.c @@ -152,10 +152,9 @@ static struct dentry *devpts_root_lookup(struct inode * dir, struct dentry * den unsigned int nentry = *p++ - '0'; if ( nentry > 9 ) return NULL; - nentry += entry * 10; - if (nentry < entry) + if ( entry >= ~0U/10 ) return NULL; - entry = nentry; + entry = nentry + entry * 10; } } |