• Jason Stubbs's avatar
    [C++] fix bounds checking on integer parsing (#4250) · a07f0d42
    Jason Stubbs authored
    * fix bounds checking on integer parsing
    
    the previous code was allowing 255 for int8_t, similar for int16_t
    and int32_t, and even negative values for unsignd types.
    
    this patch fixes bounds checking for 8-bit, 16-bit and 32-bit types.
    testing for both acceptable values and unacceptable values at the
    boundaries are also improved.
    
    bounds checking on 64-bit types isn't addressed by this patch.
    
    * fix 'unary minus operator applied to unsigned type, result still unsigned'
    
    * fix & placement
    a07f0d42
Name
Last commit
Last update
..
code_generators.cpp Loading commit data...
flatc.cpp Loading commit data...
flatc_main.cpp Loading commit data...
flathash.cpp Loading commit data...
idl_gen_cpp.cpp Loading commit data...
idl_gen_fbs.cpp Loading commit data...
idl_gen_general.cpp Loading commit data...
idl_gen_go.cpp Loading commit data...
idl_gen_grpc.cpp Loading commit data...
idl_gen_js.cpp Loading commit data...
idl_gen_php.cpp Loading commit data...
idl_gen_python.cpp Loading commit data...
idl_gen_text.cpp Loading commit data...
idl_parser.cpp Loading commit data...
reflection.cpp Loading commit data...
util.cpp Loading commit data...