]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm-5.4.12-truncate-output-buffer-after-use.patch
- make sure that the output buffer gets truncated after use, otherwise
[packages/rpm.git] / rpm-5.4.12-truncate-output-buffer-after-use.patch
diff --git a/rpm-5.4.12-truncate-output-buffer-after-use.patch b/rpm-5.4.12-truncate-output-buffer-after-use.patch
new file mode 100644 (file)
index 0000000..ff3b418
--- /dev/null
@@ -0,0 +1,11 @@
+--- rpm-5.4.12/rpmio/rpmpython.c.rpmpythontrunc~       2013-08-09 03:05:39.809947086 +0200
++++ rpm-5.4.12/rpmio/rpmpython.c       2013-08-09 03:25:25.097372593 +0200
+@@ -229,6 +229,8 @@ fprintf(stderr, "==> %s(%p,%s,%p)\n", __
+               if (sys_stdout != NULL && PycStringIO_OutputCheck(sys_stdout)) {
+                   PyObject * o = (*PycStringIO->cgetvalue)(sys_stdout);
+                   *resultp = (PyString_Check(o) ? PyString_AsString(o) : "");
++                  PyObject_CallMethod(sys_stdout, "seek", "i",0);
++                  PyObject_CallMethod(sys_stdout, "truncate", NULL);
+               } else
+                   *resultp = "";
+           }
This page took 0.025461 seconds and 4 git commands to generate.