Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
lfittl committed Dec 31, 2023
1 parent 37b001b commit 569d160
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/pg_query_parse_plpgsql.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ PgQueryPlpgsqlParseResult pg_query_parse_plpgsql(const char* input)
plpgsql_free_function_memory(func_and_error.func);

new_out_len = strlen(result.plpgsql_funcs) + strlen(func_json) + 3;
new_out = malloc(new_out_len * sizeof(char));
new_out = malloc(new_out_len);
int n = snprintf(new_out, new_out_len, "%s%s,\n", result.plpgsql_funcs, func_json);
if (n < 0 || n >= new_out_len) {
PgQueryError* error = malloc(sizeof(PgQueryError));
Expand Down
3 changes: 3 additions & 0 deletions src/postgres/src_port_strlcpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

#include "c.h"

#ifdef WIN32

/*
* Copy src to string dst of size siz. At most siz-1 characters
Expand Down Expand Up @@ -69,3 +70,5 @@ strlcpy(char *dst, const char *src, size_t siz)

return (s - src - 1); /* count does not include NUL */
}

#endif

0 comments on commit 569d160

Please sign in to comment.