Created
September 15, 2013 20:52
-
-
Save msabramo/6574246 to your computer and use it in GitHub Desktop.
This patch makes the iconv_fread test pass in FreeTDS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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