aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/bacula-server/files/patch-var-64bit
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/bacula-server/files/patch-var-64bit')
-rw-r--r--sysutils/bacula-server/files/patch-var-64bit25
1 files changed, 25 insertions, 0 deletions
diff --git a/sysutils/bacula-server/files/patch-var-64bit b/sysutils/bacula-server/files/patch-var-64bit
new file mode 100644
index 000000000000..69d6ba73fc87
--- /dev/null
+++ b/sysutils/bacula-server/files/patch-var-64bit
@@ -0,0 +1,25 @@
+--- src/lib/var.c.orig 2003-10-24 17:31:14.000000000 +0200
++++ src/lib/var.c 2003-10-24 17:30:56.000000000 +0200
+@@ -2605,21 +2605,13 @@
+ const char *fmt, va_list ap)
+ {
+ var_rc_t rc;
+- va_list apbak;
+ char *cpBuf;
+- int nBuf;
++ int nBuf = 5000;
+
+ /* argument sanity checks */
+ if (var == NULL || dst_ptr == NULL || fmt == NULL)
+ return VAR_RC(VAR_ERR_INVALID_ARGUMENT);
+
+- /* determine formatting buffer length */
+- apbak = ap;
+- nBuf = var_mvsnprintf(NULL, 0, fmt, ap);
+- ap = apbak;
+- if (nBuf == -1)
+- return VAR_RC(VAR_ERR_FORMATTING_FAILURE);
+-
+ /* perform formatting */
+ if ((cpBuf = (char *)malloc(nBuf+1)) == NULL)
+ return VAR_RC(VAR_ERR_OUT_OF_MEMORY);