Changeset: 854a34589653 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/854a34589653
Modified Files:
clients/mapiclient/dump.c
Branch: Dec2025
Log Message:
use strcpy_len instead of strndup (as thats unavailable on windows)
diffs (32 lines):
diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -1545,9 +1545,11 @@ describe_sequence(Mapi mid, const char *
if (p != NULL) {
size_t len = p - tname;
- sname = strndup(tname, len);
+ sname = malloc(len+1);
if (sname == NULL)
goto bailout;
+ strcpy_len(sname, tname, len);
+ sname[len] = 0;
tname += len + 1;
} else if ((sname = get_schema(mid)) == NULL) {
return 1;
@@ -2106,11 +2108,14 @@ dump_table(Mapi mid, const char *schema,
if (p != NULL) {
size_t len = p - tname;
- sname = strndup(tname, len);
+ sname = malloc(len+1);
if (sname == NULL) {
fprintf(stderr, "malloc failure\n");
return 1;
}
+ strcpy_len(sname, tname, len);
+ sname[len] = 0;
+
tname += len + 1;
} else if ((sname = get_schema(mid)) == NULL) {
return 1;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]