File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3569,10 +3569,12 @@ _get_context_settings(getdns_context* context)
35693569 return NULL ;
35703570
35713571 /* int fields */
3572+ /* the timeouts are stored as uint64, but the value maximum used in
3573+ practice is 6553500ms, so we just trim the value to be on the safe side. */
35723574 if ( getdns_dict_set_int (result , "timeout" ,
3573- context -> timeout )
3575+ ( context -> timeout > 0xFFFFFFFFull ) ? 0xFFFFFFFF : ( uint32_t ) context -> timeout )
35743576 || getdns_dict_set_int (result , "idle_timeout" ,
3575- context -> idle_timeout )
3577+ ( context -> idle_timeout > 0xFFFFFFFFull ) ? 0xFFFFFFFF : ( uint32_t ) context -> idle_timeout )
35763578 || getdns_dict_set_int (result , "limit_outstanding_queries" ,
35773579 context -> limit_outstanding_queries )
35783580 || getdns_dict_set_int (result , "dnssec_allowed_skew" ,
Original file line number Diff line number Diff line change @@ -862,7 +862,7 @@ _getdns_create_call_reporting_dict(
862862 return NULL ;
863863 }
864864 } else {
865- uint32_t idle_timeout = netreq -> upstream -> keepalive_timeout ;
865+ uint32_t idle_timeout = ( uint32_t ) netreq -> upstream -> keepalive_timeout ;
866866 if (getdns_dict_set_int ( netreq_debug , "idle timeout in ms" , idle_timeout )) {
867867 getdns_dict_destroy (netreq_debug );
868868 return NULL ;
You can’t perform that action at this time.
0 commit comments