never let bufferevent_rlim functions return negative

This commit is contained in:
Nick Mathewson 2010-07-05 12:26:21 -04:00
parent 142500317e
commit 085987093f

View File

@ -245,6 +245,8 @@ _bufferevent_get_rlim_max(struct bufferevent_private *bev, int is_write)
CLAMPTO(share);
}
if (max_so_far < 0)
max_so_far = 0;
return max_so_far;
}