This is an automated email from the git hooks/post-receive script. glondu pushed a commit to branch master in repository ocurl.
commit 186ce530d80f7766074be31cf84698a0dc899d24 Author: Stephane Glondu <st...@glondu.net> Date: Tue Feb 23 10:42:17 2016 +0100 Imported Upstream version 0.7.6 --- CHANGES.txt | 4 ++++ configure | 18 +++++++++--------- configure.in | 2 +- curl-helper.c | 18 +++++++++++++++--- 4 files changed, 29 insertions(+), 13 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 75b8aae..ebb2e0c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,7 @@ +0.7.6 - 25 Oct 2015 + + * fix invalid memory access in CURLOPT_HTTPPOST handling (mfp) + 0.7.5 - 24 Jul 2015 * fix build with older libcurl diff --git a/configure b/configure index 9a83085..8bc0dc6 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for ocurl 0.7.5. +# Generated by GNU Autoconf 2.69 for ocurl 0.7.6. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ocurl' PACKAGE_TARNAME='ocurl' -PACKAGE_VERSION='0.7.5' -PACKAGE_STRING='ocurl 0.7.5' +PACKAGE_VERSION='0.7.6' +PACKAGE_STRING='ocurl 0.7.6' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1245,7 +1245,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ocurl 0.7.5 to adapt to many kinds of systems. +\`configure' configures ocurl 0.7.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1306,7 +1306,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ocurl 0.7.5:";; + short | recursive ) echo "Configuration of ocurl 0.7.6:";; esac cat <<\_ACEOF @@ -1386,7 +1386,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ocurl configure 0.7.5 +ocurl configure 0.7.6 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1684,7 +1684,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ocurl $as_me 0.7.5, which was +It was created by ocurl $as_me 0.7.6, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -8653,7 +8653,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ocurl $as_me 0.7.5, which was +This file was extended by ocurl $as_me 0.7.6, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -8715,7 +8715,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ocurl config.status 0.7.5 +ocurl config.status 0.7.6 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.in b/configure.in index 0d6b053..57cc4dd 100644 --- a/configure.in +++ b/configure.in @@ -2,7 +2,7 @@ dnl dnl ocurl autoconf input dnl -AC_INIT(ocurl,0.7.5) +AC_INIT(ocurl,0.7.6) AC_PROG_CC() diff --git a/curl-helper.c b/curl-helper.c index a968800..e515b4d 100644 --- a/curl-helper.c +++ b/curl-helper.c @@ -624,6 +624,18 @@ static char* strdup_ml(value v) return p; } +/* prepends to the beginning of list */ +static struct curl_slist* curl_slist_prepend_ml(struct curl_slist* list, value v) +{ + /* FIXME check NULLs */ + struct curl_slist* new_item = malloc(sizeof(struct curl_slist)); + + new_item->next = list; + new_item->data = strdup_ml(v); + + return new_item; +} + static void free_curl_slist(struct curl_slist *slist) { if (NULL == slist) @@ -1663,7 +1675,7 @@ static void handle_HTTPPOST(Connection *conn, value option) String_val(Field(formItem, 0)), CURLFORM_NAMELENGTH, string_length(Field(formItem, 0)), - CURLFORM_PTRCONTENTS, + CURLFORM_COPYCONTENTS, String_val(Field(formItem, 1)), CURLFORM_CONTENTSLENGTH, string_length(Field(formItem, 1)), @@ -1768,7 +1780,7 @@ static void handle_HTTPPOST(Connection *conn, value option) if (Is_long(Field(formItem, 3)) && Long_val(Field(formItem, 3)) == 0) { - conn->httpPostBuffers = curl_slist_append(conn->httpPostBuffers, String_val(Field(formItem, 2))); + conn->httpPostBuffers = curl_slist_prepend_ml(conn->httpPostBuffers, Field(formItem, 2)); curl_formadd(&conn->httpPostFirst, &conn->httpPostLast, @@ -1786,7 +1798,7 @@ static void handle_HTTPPOST(Connection *conn, value option) } else if (Is_block(Field(formItem, 3))) { - conn->httpPostBuffers = curl_slist_append(conn->httpPostBuffers, String_val(Field(formItem, 2))); + conn->httpPostBuffers = curl_slist_prepend_ml(conn->httpPostBuffers, Field(formItem, 2)); contentType = Field(formItem, 3); -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ocaml-maint/packages/ocurl.git _______________________________________________ Pkg-ocaml-maint-commits mailing list Pkg-ocaml-maint-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits