summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/formdata.c
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmcurl/lib/formdata.c')
-rw-r--r--Utilities/cmcurl/lib/formdata.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Utilities/cmcurl/lib/formdata.c b/Utilities/cmcurl/lib/formdata.c
index e40c4bc..05dc9b5 100644
--- a/Utilities/cmcurl/lib/formdata.c
+++ b/Utilities/cmcurl/lib/formdata.c
@@ -603,9 +603,9 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
app passed in a bad combo, so we better check for that first. */
if(form->name) {
/* copy name (without strdup; possibly not null-terminated) */
- form->name = Curl_memdup(form->name, form->namelength?
- form->namelength:
- strlen(form->name) + 1);
+ form->name = Curl_strndup(form->name, form->namelength?
+ form->namelength:
+ strlen(form->name));
}
if(!form->name) {
return_value = CURL_FORMADD_MEMORY;
@@ -792,7 +792,7 @@ static CURLcode setname(curl_mimepart *part, const char *name, size_t len)
/* wrap call to fseeko so it matches the calling convention of callback */
static int fseeko_wrapper(void *stream, curl_off_t offset, int whence)
{
-#if defined(HAVE_FSEEKO)
+#if defined(HAVE_FSEEKO) && defined(HAVE_DECL_FSEEKO)
return fseeko(stream, (off_t)offset, whence);
#elif defined(HAVE__FSEEKI64)
return _fseeki64(stream, (__int64)offset, whence);