freebsd-dev/sys
jdp ab0e664bd0 Fix a range checking bug in ng_int32_parse which affected 64-bit
machines.  The code formerly read:

    long val;
    if (val < (long)-0x80000000 || ...)
            return EINVAL;

The constant 0x80000000 has type unsigned int.  The unary `-'
operator does not change the type (or the value, in this case).
Therefore the promotion to long is done by 0-extension, giving
0x0000000080000000 instead of the desired 0xffffffff80000000.  I
got rid of the `-' and changed the cast to (int32_t) to give proper
sign-extension on all architectures and to better reflect the fact
that we are range-checking a 32-bit value.

This commit also makes the analogous changes to ng_int{8,16}_parse
for consistency.

MFC after:	3 days
2001-05-19 19:36:32 +00:00
..
alpha Style changes -- revert ordering to mostly two revs ago. 2001-05-18 01:40:40 +00:00
amd64 Introduce a global lock for the vm subsystem (vm_mtx). 2001-05-19 01:28:09 +00:00
arm/include Make _BSD_TIME_T_ (time_t) an int' rather than long'. This will help 2001-05-18 01:43:25 +00:00
boot Allocate more memory if necessary. 2001-05-17 04:34:02 +00:00
cam Remove unneeded includes of sys/ipl.h and machine/ipl.h. 2001-05-15 23:22:29 +00:00
coda Introduce a global lock for the vm subsystem (vm_mtx). 2001-05-19 01:28:09 +00:00
compat Add new 'loadavg' entry, fix overflow with meminfo. 2001-05-19 05:54:26 +00:00
compile
conf Separate out isa attachment to its own file. The pci attachment will 2001-05-16 07:32:04 +00:00
contrib Actually biofinish(struct bio *, struct devstat *, int error) is more general 2001-05-06 20:00:03 +00:00
crypto Kernel crypto need binary key material, not symbolic ascii. 2001-03-10 13:02:58 +00:00
ddb Undo part of the tangle of having sys/lock.h and sys/mutex.h included in 2001-05-01 08:13:21 +00:00
dev #include <digi/*.h> -> #include <dev/digi/*.h> 2001-05-19 17:06:48 +00:00
fs Introduce a global lock for the vm subsystem (vm_mtx). 2001-05-19 01:28:09 +00:00
geom Polish error handling with biofinish(). 2001-05-08 09:10:27 +00:00
gnu Change the second argument of vflush() to an integer that specifies 2001-05-16 18:04:37 +00:00
i4b pseudo-device -> device in kernel config. 2001-05-01 11:26:14 +00:00
i386 Introduce a global lock for the vm subsystem (vm_mtx). 2001-05-19 01:28:09 +00:00
ia64 Style changes -- revert ordering to mostly two revs ago. 2001-05-18 01:40:40 +00:00
isa Remove unneeded includes of sys/ipl.h and machine/ipl.h. 2001-05-15 23:22:29 +00:00
isofs/cd9660 Change the second argument of vflush() to an integer that specifies 2001-05-16 18:04:37 +00:00
kern Add convenience function kernel_sysctlbyname() for kernel consumers, 2001-05-19 05:45:55 +00:00
libkern Add function prototypes and base module for kernel side iconv library. 2001-04-09 09:39:29 +00:00
miscfs Introduce a global lock for the vm subsystem (vm_mtx). 2001-05-19 01:28:09 +00:00
modules digiio.h has moved to /usr/include/sys 2001-05-19 09:28:59 +00:00
msdosfs Change the second argument of vflush() to an integer that specifies 2001-05-16 18:04:37 +00:00
net Add a couple more codes for upcoming raylink driver additions. 2001-05-17 21:37:41 +00:00
netatalk Mechanical change to use <sys/queue.h> macro API instead of 2001-02-04 13:13:25 +00:00
netatm Silence some warnings 2001-03-20 10:42:49 +00:00
netgraph Fix a range checking bug in ng_int32_parse which affected 64-bit 2001-05-19 19:36:32 +00:00
netinet In in_ifadown(), differentiate between whether the interface goes 2001-05-11 14:37:34 +00:00
netinet6 Fix typo in previous commit. 2001-04-20 08:43:20 +00:00
netipx Undo part of the tangle of having sys/lock.h and sys/mutex.h included in 2001-05-01 08:13:21 +00:00
netkey Remove unneeded includes of sys/ipl.h and machine/ipl.h. 2001-05-15 23:22:29 +00:00
netnatm Change a couple of M_WAITOKs used in M_PREPEND() to M_TRYWAITs, which 2001-04-05 04:20:48 +00:00
netncp Use new kernel_sysctlbyname function. Remove private copy. 2001-05-19 05:48:07 +00:00
netns * Rename M_WAIT mbuf subsystem flag to M_TRYWAIT. 2000-12-21 21:44:31 +00:00
netsmb Back out scanning file descriptors with holding a process lock. 2001-05-15 10:19:57 +00:00
nfs Introduce a global lock for the vm subsystem (vm_mtx). 2001-05-19 01:28:09 +00:00
nfsclient Introduce a global lock for the vm subsystem (vm_mtx). 2001-05-19 01:28:09 +00:00
nfsserver Introduce a global lock for the vm subsystem (vm_mtx). 2001-05-19 01:28:09 +00:00
ntfs Change the second argument of vflush() to an integer that specifies 2001-05-16 18:04:37 +00:00
nwfs Change the second argument of vflush() to an integer that specifies 2001-05-16 18:04:37 +00:00
pc98 Remove unneeded includes of sys/ipl.h and machine/ipl.h. 2001-05-15 23:22:29 +00:00
pccard Add back the plain i82365 to the list of bridges that do special 2001-05-19 06:36:09 +00:00
pci Introduce a global lock for the vm subsystem (vm_mtx). 2001-05-19 01:28:09 +00:00
posix4 o First step in cleaning up authorization code for the posix4 2001-05-06 16:15:42 +00:00
powerpc Make _BSD_TIME_T_ (time_t) an int' rather than long'. This will help 2001-05-18 01:43:25 +00:00
rpc Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) and 2001-03-19 12:50:13 +00:00
svr4 This patchset fixes a large number of file descriptor race conditions. 2000-11-18 21:01:04 +00:00
sys Add convenience function kernel_sysctlbyname() for kernel consumers, 2001-05-19 05:45:55 +00:00
tools replace calls to non-existant bail() subroutine with calls to 2001-03-23 11:48:50 +00:00
ufs Must ensure that all the entries on the pd_pendinghd list have been 2001-05-19 19:24:26 +00:00
vm Introduce a global lock for the vm subsystem (vm_mtx). 2001-05-19 01:28:09 +00:00
Makefile