Changeset: d49d37ece143 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d49d37ece143 Modified Files: tools/monetdbe/monetdbe.c Branch: default Log Message:
Allocation check and compilation fix diffs (18 lines): diff --git a/tools/monetdbe/monetdbe.c b/tools/monetdbe/monetdbe.c --- a/tools/monetdbe/monetdbe.c +++ b/tools/monetdbe/monetdbe.c @@ -654,10 +654,11 @@ monetdbe_create_uri(const char* host, co const int sl_host = strlen(host); const int sl_max_port = 6; // 2^16-1 < 100 000 = 10^5, i.e. always less then 6 digits. const int sl_database = strlen(database); + const int sl_total = sl_protocol + sl_host + 1 /* : */ + sl_max_port + 1 + /* / */ + sl_database ; - const int sl_total = sl_protocol + sl_host + 1 /*:*/ + sl_max_port + 1 + /*/*/ + sl_database ; - - str uri_buffer = GDKmalloc(sl_total + 1 /*terminator*/); + str uri_buffer = GDKmalloc(sl_total + 1 /* terminator */); + if (!uri_buffer) + return NULL; snprintf(uri_buffer, sl_total, "%s%s:%d/%s", protocol, host, port, database); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list