@@ -416,7 +416,7 @@ sshbuf_allocate(struct sshbuf *buf, size_t len)
416416 * what we need (the size of window_max) so if the current allocation (in
417417 * buf->alloc) is greater than window_max we skip it.
418418 */
419- if (rlen > BUF_WATERSHED && strstr ( buf -> label , "input" ) ) {
419+ if (rlen > BUF_WATERSHED ) {
420420 debug_f ("label:%s ptr: %p, prior rlen %zu and need %zu buf_alloc is %zu" ,
421421 buf -> label , buf , rlen , need , buf -> alloc );
422422 /* set need to the the max window size less the current allocation */
@@ -427,21 +427,6 @@ sshbuf_allocate(struct sshbuf *buf, size_t len)
427427 }
428428 SSHBUF_DBG (("need %zu initial rlen %zu" , need , rlen ));
429429
430- /* there is a buffer that needs to grow quickly but doesn't seem to count as
431- * input or output so we check to make sure that window_max isn't set
432- * before we do. In this case we set it immediately to the maximum
433- * allocated buffer size which should be about 32MB
434- * this likely isn't the right way to do this but it works for now
435- * TODO: Come up with a better solution -cjr 12/1/2022 */
436- if (rlen > BUF_WATERSHED && buf -> window_max == 0 ) {
437- //rlen = rlen + (4*1024*1024);
438- debug_f ("************* rlen is now %lu" , rlen );
439- debug_f ("************* max_size is %lu" , buf -> max_size );
440- gettimeofday (& current_time , NULL );
441- debug_f ("label: %s, size: %lu, allocated: %lu, Max alloc: %lu, Age: %0.8f" , buf -> label ,
442- buf -> size , buf -> alloc , buf -> max_size ,
443- time_diff (& (buf -> buf_ts ), & current_time ));
444- }
445430 /* rlen might be above the max allocation */
446431 if (rlen > buf -> max_size ) {
447432 rlen = buf -> max_size ;
0 commit comments