Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This patch makes the iconv_fread test pass in FreeTDS
diff --git a/src/tds/stream.c b/src/tds/stream.c
index a008ebe..74e3268 100644
--- a/src/tds/stream.c
+++ b/src/tds/stream.c
@@ -205,11 +205,11 @@ TDSRET tds_dynamic_stream_init(TDSDYNAMICSTREAM * stream, void **ptr, size_t all
{
stream->stream.write = tds_dynamic_stream_write;
stream->buf = ptr;
- if (allocated < 1024) {
+ if (allocated < 4096) {
if (*ptr) free(*ptr);
- *ptr = malloc(1024);
+ *ptr = malloc(4096);
if (!*ptr) return TDS_FAIL;
- allocated = 1024;
+ allocated = 4096;
}
stream->allocated = allocated;
stream->size = 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment