Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Apr 29 22:57:00 2017 +0100

    Prevent invalid record parameter

    This can happen if invalid data are sent.
    For instance if server send some parameter using PARAMFMT followed
    by old style PARAM. You potentially get a result which is half
    composed by a row and half by separate data.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Apr 29 22:27:47 2017 +0100

    Assure SELECT @@PID query returns a normal row

    Invalid server response can cause a different row type
    to be returned causing a NULL pointer dereference in tds_set_spid.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Apr 29 21:14:46 2017 +0100

    Add an invalid data type to avoid not initialized pointer to functions

    Always initialize TDSCOLUMN->funcs to avoid NULL pointer dereferences.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Apr 29 18:53:18 2017 +0100

    Do not send clear text password if encryption login is required on Sybase

    Password should just be sent encrypted, no reason to send also
    not encrypted.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Apr 15 15:49:12 2017 +0100

    Check server is not returning negative values for column sizes

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Apr 2 15:28:07 2017 +0100

    Handle errors getting datatype meta information

    This prevent server to send wrong encoded types

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Apr 15 15:20:05 2017 +0100

    Detect and handle some protocol problem

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Apr 15 15:18:48 2017 +0100

    Avoid some assert to be triggered by server

    Instead of crashing the client detect the protocol problem
    and close the connection.

Author: Attila Horváth <ahorvath@fusioneer.com>
Date:   Fri Mar 10 15:22:50 2017 +0000

    Do not override per-connection timeout settings in dbsettime

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Feb 25 18:29:33 2017 +0000

    Support SQL Anywhere connections

    SQL Anywhere does not support multiple databases and USE statement
    so don't send the request to avoid connection failures

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Feb 14 11:20:03 2017 +0000

    Provide compatibility with OpenSSL 1.1

    OpenSSL 1.1 changed quite a lot API since 1.0.
    Update code to make it compatible with either versions.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Feb 6 14:41:18 2017 +0000

    Fix SSPI connections using protocols >7.1

    Do not check for a minimal size on the SSPI data received from the
    server.
    This fix some connection problems using protocols >7.1.

    Reported-by: Ladislav Karrach <lacak@zoznam.sk>

Author: Dave Beaudet <beaudet@gmail.com>
Date:   Fri Feb 3 21:37:48 2017 +0000

    Added support for configurable openssl cipher list

    Added new option to freetds.conf for specifying the cipher list
    supplied to openssl. This is necessary for several reasons:
    1. organizations that need more control over the specifics of
      encrypted connections
    2. to overcome the occasional incompatibility (sometimes intermittent)
       between open source encryption libraries and Microsoft's
       implementations. For example, several users reported intermittent
       connection problems where roughly 0.5% of connection attempts would
       fail for some reason. Removing specific key exchange protocols
       provided relief in at least one case.
    3. The cipher list can be specified in more generic terms, e.g.
       "HIGH:!SSLv2:!aNULL:-DH" rather than having to list specific cipher
       configurations that are otherwise subject to becoming outdated as
       the encryption landscape changes.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Dec 24 10:36:58 2016 +0000

    Fix TLS hostname validation using OpenSSL

    When attempting to make a connection to a SQL Server and providing
    a CA Cert file, FreeTDS was unable to validate a hostname.

    The function check_name_match in tls.c was checking the wrong
    value from check_wildcard.

    This fixes GitHub Issue #90

    Reported-by: Alex Loney

Author: Jeff Farr <jefarr@wayfair.com>
Date:   Mon Dec 5 13:01:21 2016 -0500

    Process batch statements without a select correctly

    If you send a batch of statements in a single call to the database, and
    these statements don't return rows, the dbresults function doesn't
    process the data correctly. It will loop over all data the first time it
    is called and return to the calling function that there are no more
    rows.

    Added a return on TDS_DONE_RESULT that stops processing data when a batch
    of statements doesn't contain a select.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Nov 30 23:26:16 2016 +0000

    Read trailing tokens after dbnextrow

    This fix rpc test after batch statement fix.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Nov 17 06:17:36 2016 +0000

    Fix string conversion in ODBC if string is really long

    During string conversion is needed to compute and return the size
    of all converted string even if is returned only partially.
    In the case the part of the unconverted string was very long
    this was considered like an error (SQL_ERROR) instead of a
    warning (SQL_SUCCESS_WITH_INFO).

Author: Peter Deacon <peterd@iea-software.com>
Date:   Tue Nov 15 09:21:40 2016 +0000

    Fix invalid free which lead to crash

    buf is not allocated with a malloc family function,
    the buffer will be freed as the string is freed.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Nov 11 17:24:20 2016 +0000

    Fix possible infinite recursive calls calling tds_disconnect

    In tds_disconnect when sending logout token ran into a problem
    where tds_put_byte failure leads to a recursive calls to
    tds_disconnect until process runs out of stack.

    Rough loop:

    tds_disconnect
    tds_put_byte
    tds_write_packet
    tds_connection_write
    tds_goodwrite
    tds_connection_close
    close_socket
    tds_disconnect
    ...

    Reported-by: Peter Deacon <peterd@iea-software.com>

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Nov 5 14:17:21 2016 +0000

    Avoid losing sync if a conversion problem happens

    This happened for TEXT or long strings.
    Shorter strings already have this behaviour.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Nov 5 14:15:53 2016 +0000

    Set column_cur_size even on conversion errors

    Allows to read truncated data instead of discarding everything.
    This can happen on invalid encoding inside strings.
    As internal conversions will replace invalid sequence and signal
    the problem with callbacks client can at least show some data.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Nov 4 05:30:47 2016 +0000

    bcp: Do not trim non ascii columns

    This avoid trimming multi byte encoding ending with 0x20 bytes.

    This fixes
    http://stackoverflow.com/questions/38984053/freebcp-unicode-data-is-odd-byte-size-for-column-should-be-even-byte-size
    (https://github.com/FreeTDS/freetds/issues/80)

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Sep 1 22:41:52 2016 +0100

    Update OpenSSL cipher list

    This increase security and also fix a recent incompatibility
    between OpenSSL and SChannel (SChannel versions patched in a
    couple of months).

Author: John Kendall <john@capps.com>
Date:   Thu Aug 25 12:09:50 2016 +0100

    Handle correctly long object in defncopy for ASE servers

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Jul 22 10:27:08 2016 +0100

    Remove some string overflows from VMS code

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Jul 22 10:29:19 2016 +0100

    pool: Avoid to overwrite packet if not entirely written

    This can happen if packet is not entirely written to server after
    being read from client.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Jul 18 12:09:07 2016 +0100

    Extends cs_dt_crack to support newer types

    This add a new cs_dt_crack_v2 ABI function (cs_dt_crack API is redirected
    to it using a preprocessor macro). This to make the extension of
    CS_DATEREC more safe (version of 1.0 could call cs_dt_crack with
    CS_BIGDATETIME_TYPE/CS_BIGTIME_TYPE without having these fields written
    which would possible cause memory corruption on version compiled with
    these fields missing).
    This make sqsh compile and work with newer date/time types.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Jul 18 09:38:13 2016 +0100

    Make AppVeyor build with OpenSSL enabled

    CMake was not finding OpenSSL.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Jun 27 12:59:07 2016 +0100

    Fix NUMERIC column for bcp native format

    Prefix was not handled correctly.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Jun 26 11:23:15 2016 +0100

    Fix freebcp -E (identity columns) output

    An additional query prevented code to handle correctly column types.

Author: Manfroi Fabrice <fm@4js.com>
Date:   Wed Jun 22 16:33:53 2016 +0200

    Fix build error on AIX 6.1 / 7.1 / 7.2

    tls.c:719: error: 'AF_INET6' undeclared (first use in this function)
    tls.c:719: error: (Each undeclared identifier is reported only once
    tls.c:719: error: for each function it appears in.)
    tls.c:722: error: 'AF_INET' undeclared (first use in this function)

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Jun 18 21:08:17 2016 +0100

    Fix internal result state in dbcanquery

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Jun 18 13:27:56 2016 +0100

    Avoid to strip spaces from procedure text.

    NTBSTRINGBIND strip spaces at the end.
    Using STRINGBIND with 0 size cause string to be just NUL terminated.
    The 0 would lead to a possible overflow however we check the column
    len before doing the bind to avoid such possibility.

    Original patch from Nem W Schlecht.

Author: Nem W Schlecht <nem@emptec.com>
Date:   Fri Jun 17 22:38:12 2016 +0100

    Avoid crash on connection error and report an error instead

    Patch from Nem W Schlecht.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Jun 12 21:09:43 2016 +0100

    allows to specify 5.0 as tds protocol version during configure

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Jun 11 09:32:43 2016 +0100

    do not compile as bundle under Mac OS X is --with-odbc-nodm is specified

    In this case the driver will be used as a dynamic library (not loaded
    dynamically) so compile as such.
    In case a DM is used unit tests/application will link to the DM which
    will load the driver (requiring to be a module on old Mac OS X versions).

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Jun 10 11:45:44 2016 +0100

    replace BYTE with unsigned char in ODBC files

    BYTE is not supported on some platforms.
    This fixes Mac OS X build.
    unixODBC headers files and Windows platform define it.

