Skip to content

Conversation

@bpintea
Copy link
Collaborator

@bpintea bpintea commented Nov 13, 2019

If the application provides an output buffer for the constructed
connection string, the driver will currently return an error and thus
fail the connection. The correct handling is however to apply truncation
but return the number of characters available without truncation.

This PR works around swprintf() returning an error code, but
otherwise correctly 0-terminating the destination buffer and not setting
the errno.

If the application provides an output buffer for the constructed
connection string, the driver will currently return an error and thus
fail the connection. The correct handling is however to apply truncation
but return the number of characters available without trunctation.

This commit works around swprintf() returning an error code, but
otherwise correctly 0-terminating the destination buffer and not setting
the errno.
Copy link
Collaborator

@edsavage edsavage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bpintea bpintea merged commit ef5dccb into elastic:master Nov 13, 2019
bpintea added a commit that referenced this pull request Nov 13, 2019
If the application provides an output buffer for the constructed
connection string, the driver will currently return an error and thus
fail the connection. The correct handling is however to apply truncation
but return the number of characters available without trunctation.

This commit works around swprintf() returning an error code, but
otherwise correctly 0-terminating the destination buffer and not setting
the errno.

(cherry picked from commit ef5dccb)
bpintea added a commit that referenced this pull request Nov 13, 2019
If the application provides an output buffer for the constructed
connection string, the driver will currently return an error and thus
fail the connection. The correct handling is however to apply truncation
but return the number of characters available without trunctation.

This commit works around swprintf() returning an error code, but
otherwise correctly 0-terminating the destination buffer and not setting
the errno.

(cherry picked from commit ef5dccb)
@bpintea bpintea removed the v7.4.0 label Nov 13, 2019
@bpintea bpintea deleted the fix/driverconnect_out_buffer branch November 15, 2019 00:39
bpintea added a commit that referenced this pull request Dec 4, 2019
If the application provides an output buffer for the constructed
connection string, the driver will currently return an error and thus
fail the connection. The correct handling is however to apply truncation
but return the number of characters available without trunctation.

This commit works around swprintf() returning an error code, but
otherwise correctly 0-terminating the destination buffer and not setting
the errno.

(cherry picked from commit ef5dccb)

Merge changed to use 6.8 ES/SQL data types (test/connected_dbc.*).
@bpintea bpintea added the v6.8.6 label Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants