diff --git a/extra/udfhack/linux/32/lib_postgresqludf_sys/lib_postgresqludf_sys.c b/extra/udfhack/linux/32/lib_postgresqludf_sys/lib_postgresqludf_sys.c index afb925ef2..73bbac951 100644 --- a/extra/udfhack/linux/32/lib_postgresqludf_sys/lib_postgresqludf_sys.c +++ b/extra/udfhack/linux/32/lib_postgresqludf_sys/lib_postgresqludf_sys.c @@ -122,6 +122,8 @@ extern DLLIMPORT Datum sys_eval(PG_FUNCTION_ARGS) { result = (char *)malloc(1); outlen = 0; + result[0] = (char)0; + pipe = popen(command, "r"); while (fgets(line, sizeof(line), pipe) != NULL) { diff --git a/extra/udfhack/linux/64/lib_postgresqludf_sys/lib_postgresqludf_sys.c b/extra/udfhack/linux/64/lib_postgresqludf_sys/lib_postgresqludf_sys.c index afb925ef2..73bbac951 100644 --- a/extra/udfhack/linux/64/lib_postgresqludf_sys/lib_postgresqludf_sys.c +++ b/extra/udfhack/linux/64/lib_postgresqludf_sys/lib_postgresqludf_sys.c @@ -122,6 +122,8 @@ extern DLLIMPORT Datum sys_eval(PG_FUNCTION_ARGS) { result = (char *)malloc(1); outlen = 0; + result[0] = (char)0; + pipe = popen(command, "r"); while (fgets(line, sizeof(line), pipe) != NULL) { diff --git a/udf/postgresql/linux/32/8.3/lib_postgresqludf_sys.so b/udf/postgresql/linux/32/8.3/lib_postgresqludf_sys.so index 30f45fd54..eb20b094e 100755 Binary files a/udf/postgresql/linux/32/8.3/lib_postgresqludf_sys.so and b/udf/postgresql/linux/32/8.3/lib_postgresqludf_sys.so differ diff --git a/udf/postgresql/linux/32/8.4/lib_postgresqludf_sys.so b/udf/postgresql/linux/32/8.4/lib_postgresqludf_sys.so index d5c13a404..9e07a823f 100755 Binary files a/udf/postgresql/linux/32/8.4/lib_postgresqludf_sys.so and b/udf/postgresql/linux/32/8.4/lib_postgresqludf_sys.so differ