1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

gtls: fixed a lingering BUFSIZE reference

This commit is contained in:
Dan Fandrich 2017-05-02 09:08:56 +02:00
parent eab6732fde
commit 6943085b50
2 changed files with 5 additions and 4 deletions

View File

@ -1349,7 +1349,7 @@ struct UrlState {
long sessionage; /* number of the most recent session */ long sessionage; /* number of the most recent session */
unsigned int tempcount; /* number of entries in use in tempwrite, 0 - 3 */ unsigned int tempcount; /* number of entries in use in tempwrite, 0 - 3 */
struct tempbuf tempwrite[3]; /* BOTH, HEADER, BODY */ struct tempbuf tempwrite[3]; /* BOTH, HEADER, BODY */
char *scratch; /* huge buffer[BUFSIZE*2] when doing upload CRLF replacing */ char *scratch; /* huge buffer[set.buffer_size*2] for upload CRLF replacing */
bool errorbuf; /* Set to TRUE if the error buffer is already filled in. bool errorbuf; /* Set to TRUE if the error buffer is already filled in.
This must be set to FALSE every time _easy_perform() is This must be set to FALSE every time _easy_perform() is
called. */ called. */

View File

@ -218,12 +218,13 @@ static void showtime(struct Curl_easy *data,
{ {
struct tm buffer; struct tm buffer;
const struct tm *tm = &buffer; const struct tm *tm = &buffer;
char str[96];
CURLcode result = Curl_gmtime(stamp, &buffer); CURLcode result = Curl_gmtime(stamp, &buffer);
if(result) if(result)
return; return;
snprintf(data->state.buffer, snprintf(str,
BUFSIZE, sizeof(str),
"\t %s: %s, %02d %s %4d %02d:%02d:%02d GMT", "\t %s: %s, %02d %s %4d %02d:%02d:%02d GMT",
text, text,
Curl_wkday[tm->tm_wday?tm->tm_wday-1:6], Curl_wkday[tm->tm_wday?tm->tm_wday-1:6],
@ -233,7 +234,7 @@ static void showtime(struct Curl_easy *data,
tm->tm_hour, tm->tm_hour,
tm->tm_min, tm->tm_min,
tm->tm_sec); tm->tm_sec);
infof(data, "%s\n", data->state.buffer); infof(data, "%s\n", str);
} }
#endif #endif