diff options
Diffstat (limited to 'libs/libcurl/src/dynbuf.c')
-rw-r--r-- | libs/libcurl/src/dynbuf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/libcurl/src/dynbuf.c b/libs/libcurl/src/dynbuf.c index dcf3da23ac..16a47108ca 100644 --- a/libs/libcurl/src/dynbuf.c +++ b/libs/libcurl/src/dynbuf.c @@ -81,7 +81,7 @@ static CURLcode dyn_nappend(struct dynbuf *s, if(fit > s->toobig) {
Curl_dyn_free(s);
- return CURLE_OUT_OF_MEMORY;
+ return CURLE_TOO_LARGE;
}
else if(!a) {
DEBUGASSERT(!indx);
@@ -199,6 +199,9 @@ CURLcode Curl_dyn_vaddf(struct dynbuf *s, const char *fmt, va_list ap) if(!rc)
return CURLE_OK;
+ else if(rc == MERR_TOO_LARGE)
+ return CURLE_TOO_LARGE;
+ return CURLE_OUT_OF_MEMORY;
#else
char *str;
str = vaprintf(fmt, ap); /* this allocs a new string to append */
@@ -210,8 +213,8 @@ CURLcode Curl_dyn_vaddf(struct dynbuf *s, const char *fmt, va_list ap) }
/* If we failed, we cleanup the whole buffer and return error */
Curl_dyn_free(s);
+ return CURLE_OK;
#endif
- return CURLE_OUT_OF_MEMORY;
}
/*
|