freebsd-dev/sys/netgraph
John Polstra a514569e9a 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
..
netgraph.h Catch up to header include changes: 2001-03-28 09:17:56 +00:00
ng_async.c
ng_async.h
ng_base.c netgraph.h: 2001-03-10 16:31:00 +00:00
ng_bpf.c
ng_bpf.h
ng_bridge.c
ng_bridge.h
ng_cisco.c
ng_cisco.h
ng_echo.c
ng_echo.h
ng_eiface.c Allow a changed MAC address to show up in ifconfig by changing it 2001-02-26 09:31:54 +00:00
ng_eiface.h slight cleanups during testing. 2001-02-25 16:49:04 +00:00
ng_ether.c
ng_ether.h
ng_frame_relay.c
ng_frame_relay.h
ng_hole.c
ng_hole.h
ng_iface.c
ng_iface.h
ng_ksocket.c Fix an erroneous comment and two style(9) bugs. 2001-02-16 17:37:31 +00:00
ng_ksocket.h
ng_lmi.c
ng_lmi.h
ng_message.h
ng_mppc.c
ng_mppc.h
ng_one2many.c
ng_one2many.h
ng_parse.c Fix a range checking bug in ng_int32_parse which affected 64-bit 2001-05-19 19:36:32 +00:00
ng_parse.h
ng_ppp.c
ng_ppp.h
ng_pppoe.c Shuffle sysctls a bit (thankyou whoever made them dynamic for modules) 2001-02-23 16:34:22 +00:00
ng_pppoe.h Shuffle sysctls a bit (thankyou whoever made them dynamic for modules) 2001-02-23 16:34:22 +00:00
ng_pptpgre.c Don't reference a node after we dropped a reference to it 2001-04-11 22:04:47 +00:00
ng_pptpgre.h
ng_rfc1490.c
ng_rfc1490.h
ng_sample.c Make the sample netgraph node compileable again. 2001-02-25 05:36:25 +00:00
ng_sample.h
ng_socket.c Shuffle sysctls a bit (thankyou whoever made them dynamic for modules) 2001-02-23 16:34:22 +00:00
ng_socket.h
ng_socketvar.h
ng_split.c Add a 'splitter' node to separate a bidirectional 2001-02-22 17:14:36 +00:00
ng_split.h Add a 'splitter' node to separate a bidirectional 2001-02-22 17:14:36 +00:00
ng_tee.c
ng_tee.h
ng_tty.c Remove unneeded includes in the i386 case. 2001-05-15 23:16:18 +00:00
ng_tty.h
ng_UI.c
ng_UI.h
ng_vjc.c
ng_vjc.h
NOTES