patch-2.2.16 linux/fs/proc/generic.c
Next file: linux/fs/proc/proc_tty.c
Previous file: linux/fs/proc/array.c
Back to the patch index
Back to the overall index
-  Lines: 14
-  Date:
Wed Jun  7 14:26:44 2000
-  Orig file: 
v2.2.15/linux/fs/proc/generic.c
-  Orig date: 
Mon Aug 24 13:02:44 1998
diff -urN v2.2.15/linux/fs/proc/generic.c linux/fs/proc/generic.c
@@ -198,9 +198,13 @@
 {
     switch (orig) {
     case 0:
+	if (offset < 0)
+	    return -EINVAL;    
 	file->f_pos = offset;
 	return(file->f_pos);
     case 1:
+	if (offset + file->f_pos < 0)
+	    return -EINVAL;    
 	file->f_pos += offset;
 	return(file->f_pos);
     case 2:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)