Loading lib/transfer.c +4 −4 Original line number Diff line number Diff line Loading @@ -313,7 +313,7 @@ CURLcode Curl_readwrite(struct connectdata *conn, if (k->hbuflen + nread >= data->state.headersize) { /* We enlarge the header buffer as it is too small */ char *newbuff; long newsize=MAX((k->hbuflen+nread)*3/2, long newsize=CURLMAX((k->hbuflen+nread)*3/2, data->state.headersize*2); hbufp_index = k->hbufp - data->state.headerbuff; newbuff = (char *)realloc(data->state.headerbuff, newsize); Loading Loading @@ -358,7 +358,7 @@ CURLcode Curl_readwrite(struct connectdata *conn, if (k->hbuflen + full_length >= data->state.headersize) { char *newbuff; long newsize=MAX((k->hbuflen+full_length)*3/2, long newsize=CURLMAX((k->hbuflen+full_length)*3/2, data->state.headersize*2); hbufp_index = k->hbufp - data->state.headerbuff; newbuff = (char *)realloc(data->state.headerbuff, newsize); Loading lib/urldata.h +3 −4 Original line number Diff line number Diff line Loading @@ -110,10 +110,9 @@ /* Maximum number of dirs supported by libcurl in a FTP dir hierarchy */ #define CURL_MAX_FTP_DIRDEPTH 100 /* Just a convenience macro to get the larger value out of two given */ #ifndef MAX #define MAX(x,y) ((x)>(y)?(x):(y)) #endif /* Just a convenience macro to get the larger value out of two given. We prefix with CURL to prevent name collisions. */ #define CURLMAX(x,y) ((x)>(y)?(x):(y)) #ifdef HAVE_KRB4 /* Types needed for krb4-ftp connections */ Loading Loading
lib/transfer.c +4 −4 Original line number Diff line number Diff line Loading @@ -313,7 +313,7 @@ CURLcode Curl_readwrite(struct connectdata *conn, if (k->hbuflen + nread >= data->state.headersize) { /* We enlarge the header buffer as it is too small */ char *newbuff; long newsize=MAX((k->hbuflen+nread)*3/2, long newsize=CURLMAX((k->hbuflen+nread)*3/2, data->state.headersize*2); hbufp_index = k->hbufp - data->state.headerbuff; newbuff = (char *)realloc(data->state.headerbuff, newsize); Loading Loading @@ -358,7 +358,7 @@ CURLcode Curl_readwrite(struct connectdata *conn, if (k->hbuflen + full_length >= data->state.headersize) { char *newbuff; long newsize=MAX((k->hbuflen+full_length)*3/2, long newsize=CURLMAX((k->hbuflen+full_length)*3/2, data->state.headersize*2); hbufp_index = k->hbufp - data->state.headerbuff; newbuff = (char *)realloc(data->state.headerbuff, newsize); Loading
lib/urldata.h +3 −4 Original line number Diff line number Diff line Loading @@ -110,10 +110,9 @@ /* Maximum number of dirs supported by libcurl in a FTP dir hierarchy */ #define CURL_MAX_FTP_DIRDEPTH 100 /* Just a convenience macro to get the larger value out of two given */ #ifndef MAX #define MAX(x,y) ((x)>(y)?(x):(y)) #endif /* Just a convenience macro to get the larger value out of two given. We prefix with CURL to prevent name collisions. */ #define CURLMAX(x,y) ((x)>(y)?(x):(y)) #ifdef HAVE_KRB4 /* Types needed for krb4-ftp connections */ Loading