[OpenAFS-devel] patch: better argument checking
Nickolai Zeldovich
kolya@MIT.EDU
Thu, 30 Nov 2000 21:52:40 -0500
More-or-less self-explanatory; argument checking is a good thing.
-- kolya
Index: afs_pioctl.c
===================================================================
RCS file: /cvs/openafs/src/afs/afs_pioctl.c,v
retrieving revision 1.3
diff -c -r1.3 afs_pioctl.c
*** afs_pioctl.c 2000/11/05 01:16:18 1.3
--- afs_pioctl.c 2000/12/01 02:39:17
***************
*** 2421,2426 ****
--- 2421,2428 ----
afs_int32 cell, volume;
AFS_STATCNT(PFlushVolumeData);
+ if (!avc)
+ return EINVAL;
if ( !afs_resourceinit_flag ) /* afs deamons havn't started yet */
return EIO; /* Inappropriate ioctl for device */