]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix error conditions in bpipe.c DVD routine (terminate buffer).
authorKern Sibbald <kern@sibbald.com>
Thu, 13 Oct 2005 18:55:49 +0000 (18:55 +0000)
committerKern Sibbald <kern@sibbald.com>
Thu, 13 Oct 2005 18:55:49 +0000 (18:55 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2439 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/kes-1.37
bacula/src/lib/bpipe.c

index bee3634e18edec64fa28b81feb6550f98ce0a62c..871ce2afc8b1f70c7dc19151e3322c03da11762a 100644 (file)
@@ -5,6 +5,7 @@ General:
 
 Changes to 1.37.41:
 13Oct05
+- Fix error conditions in bpipe.c DVD routine (terminate buffer).
 - Use a bigger buffer 32K as suggested by Arno in bpipe.c.
 - Increase dvd mount timeout with patch from Arno.
 - Modify DVD code so that it keeps a state flag that indicates
index 0e9b9d54a97170cbdf5ae50c6b6cfd9e7a372794..e75b7698bd52644b5d67a21fc2f2f9dc446ae9e4 100644 (file)
@@ -338,7 +338,9 @@ int run_program_full_output(char *prog, int wait, POOLMEM *results)
    sm_check(__FILE__, __LINE__, false);
    tmp[0] = 0;
    while (1) {
+      buf[0] = 0;
       fgets(buf, bufsize, bpipe->rfd);
+      buf[bufsize] = 0;
       pm_strcat(tmp, buf);
       if (feof(bpipe->rfd)) {
          stat1 = 0;