patch-2.1.124 linux/fs/devpts/root.c
Next file: linux/fs/ext2/ialloc.c
Previous file: linux/fs/block_dev.c
Back to the patch index
Back to the overall index
- Lines: 17
- Date:
Wed Sep 30 10:46:53 1998
- Orig file:
v2.1.123/linux/fs/devpts/root.c
- Orig date:
Thu Sep 17 17:53:37 1998
diff -u --recursive --new-file v2.1.123/linux/fs/devpts/root.c linux/fs/devpts/root.c
@@ -155,10 +155,13 @@
entry = *p++ - '0';
for ( i = dentry->d_name.len-1 ; i ; i-- ) {
- if ( *p < '0' || *p > '9' )
+ unsigned int nentry = *p++ - '0';
+ if ( nentry > 9 )
return 0;
- entry *= 10;
- entry += (*p++ - '0');
+ nentry += entry * 10;
+ if (nentry < entry)
+ return 0;
+ entry = nentry;
}
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov