Ticket #9324: signal_set_service.ipp.patch

File signal_set_service.ipp.patch, 990 bytes (added by Shailesh Venugopal <svenugopal@…>, 9 years ago)

Fix for off by one error

  • boost/asio/detail/impl/signal_set_service.ipp

    diff -ruN boost_1_54_0-boot/boost/asio/detail/impl/signal_set_service.ipp boost_1_54_0-patched/boost/asio/detail/impl/signal_set_service.ipp
    old new  
    219219    int signal_number, boost::system::error_code& ec)
    220220{
    221221  // Check that the signal number is valid.
    222   if (signal_number < 0 || signal_number > max_signal_number)
     222  if (signal_number < 0 || signal_number >= max_signal_number)
    223223  {
    224224    ec = boost::asio::error::invalid_argument;
    225225    return ec;
     
    293293    int signal_number, boost::system::error_code& ec)
    294294{
    295295  // Check that the signal number is valid.
    296   if (signal_number < 0 || signal_number > max_signal_number)
     296  if (signal_number < 0 || signal_number >= max_signal_number)
    297297  {
    298298    ec = boost::asio::error::invalid_argument;
    299299    return ec;