Skip to content
Permalink
Browse files

Fix numeric underflow on calculating window size adjustment

  • Loading branch information...
sapier sapier
sapier authored and sapier committed May 4, 2014
1 parent cfb2662 commit 09e8bbea03c72cfc21560f953561183b9d29be6a
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/connection.cpp
  2. +1 −1 src/connection.h
@@ -716,7 +716,7 @@ void Channel::UpdateTimers(float dtime,bool legacy_peer)
packet_too_late = current_packet_too_late;
packets_successfull = current_packet_successfull;

if (current_bytes_transfered > (window_size*512/2))
if (current_bytes_transfered > (unsigned int) (window_size*512/2))
{
reasonable_amount_of_data_transmitted = true;
}
@@ -546,7 +546,7 @@ class Channel
void setWindowSize(unsigned int size) { window_size = size; };
private:
JMutex m_internal_mutex;
unsigned int window_size;
int window_size;

u16 next_incoming_seqnum;

0 comments on commit 09e8bbe

Please sign in to comment.
You can’t perform that action at this time.