updated to 1.2.3
This commit is contained in:
Peter Schiffer 2013-04-24 14:31:48 +02:00
parent e3c500e6fe
commit b9f454dd92
5 changed files with 8 additions and 106 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
/libpipeline-1.2.2.tar.gz
/libpipeline-1.2.3.tar.gz

View File

@ -1,19 +0,0 @@
diff -upr libpipeline-1.2.2.orig/lib/pipeline.c libpipeline-1.2.2/lib/pipeline.c
--- libpipeline-1.2.2.orig/lib/pipeline.c 2012-03-04 18:43:07.000000000 +0100
+++ libpipeline-1.2.2/lib/pipeline.c 2012-11-30 14:46:14.395724863 +0100
@@ -2168,8 +2168,13 @@ const char *pipeline_readline (pipeline
{
size_t buflen;
const char *buffer = get_line (p, &buflen);
- if (buffer)
- p->peek_offset -= buflen;
+ if (buffer) {
+ if (p->peek_offset > buflen) {
+ p->peek_offset -= buflen;
+ } else {
+ p->peek_offset = 0;
+ }
+ }
return buffer;
}

View File

@ -1,76 +0,0 @@
diff -upr libpipeline-1.2.2.orig/lib/pipeline.c libpipeline-1.2.2/lib/pipeline.c
--- libpipeline-1.2.2.orig/lib/pipeline.c 2013-03-13 10:23:09.000000000 +0100
+++ libpipeline-1.2.2/lib/pipeline.c 2013-03-13 14:04:12.112208797 +0100
@@ -255,6 +255,7 @@ pipecmd *pipecmd_new_argstr (const char
* work when being executed directly. To work around this,
* we just drop "exec" if it appears at the start of argstr.
*/
+ free (arg);
arg = argstr_get_word (&argstr);
if (!arg)
error (FATAL, 0,
diff -upr libpipeline-1.2.2.orig/tests/argstr.c libpipeline-1.2.2/tests/argstr.c
--- libpipeline-1.2.2.orig/tests/argstr.c 2010-10-29 04:08:04.000000000 +0200
+++ libpipeline-1.2.2/tests/argstr.c 2013-03-13 12:00:58.310964032 +0100
@@ -62,6 +62,7 @@ START_TEST (test_argstr_exec)
fail_unless (cmd->u.process.argc == 2);
fail_unless (!strcmp (cmd->u.process.argv[0], "foo"));
fail_unless (!strcmp (cmd->u.process.argv[1], "bar"));
+ pipecmd_free (cmd);
}
END_TEST
diff -upr libpipeline-1.2.2.orig/tests/basic.c libpipeline-1.2.2/tests/basic.c
--- libpipeline-1.2.2.orig/tests/basic.c 2011-09-26 12:04:34.000000000 +0200
+++ libpipeline-1.2.2/tests/basic.c 2013-03-13 14:11:52.891928581 +0100
@@ -101,6 +101,7 @@ START_TEST (test_basic_wait_all)
fail_unless (statuses[1] == 3 * 256);
fail_unless (statuses[2] == 0);
pipeline_free (p);
+ free (statuses);
}
END_TEST
@@ -200,6 +201,8 @@ START_TEST (test_basic_clearenv)
"clearenv+setenv+dup returned second line '%s', expected 'bar\n'",
line2);
pipeline_wait (p2);
+ pipeline_free (p2);
+ pipeline_free (p);
}
END_TEST
diff -upr libpipeline-1.2.2.orig/tests/exec.c libpipeline-1.2.2/tests/exec.c
--- libpipeline-1.2.2.orig/tests/exec.c 2012-02-27 23:00:53.000000000 +0100
+++ libpipeline-1.2.2/tests/exec.c 2013-03-13 12:11:15.498591343 +0100
@@ -71,6 +71,8 @@ START_TEST (test_exec_process)
fail_unless (WEXITSTATUS (status) == i);
else
fail_if (WEXITSTATUS (status) == 0);
+
+ pipecmd_free (cmd);
}
}
END_TEST
@@ -109,6 +111,8 @@ START_TEST (test_exec_function)
fail_unless (WIFEXITED (status));
fail_unless (WEXITSTATUS (status) == i);
+
+ pipecmd_free (cmd);
}
}
END_TEST
diff -upr libpipeline-1.2.2.orig/tests/redirect.c libpipeline-1.2.2/tests/redirect.c
--- libpipeline-1.2.2.orig/tests/redirect.c 2012-02-29 19:23:59.000000000 +0100
+++ libpipeline-1.2.2/tests/redirect.c 2013-03-13 14:10:05.601323557 +0100
@@ -56,6 +56,9 @@ START_TEST (test_redirect_files)
fclose (fh);
unlink (template);
+
+ pipeline_free(p);
+ free (template);
}
END_TEST

View File

@ -2,18 +2,13 @@
Summary: A pipeline manipulation library
Name: libpipeline
Version: 1.2.2
Release: 4%{?dist}
Version: 1.2.3
Release: 1%{?dist}
License: GPLv3+
Group: Development/Libraries
URL: http://libpipeline.nongnu.org/
Source: http://download.savannah.gnu.org/releases/libpipeline/libpipeline-%{version}.tar.gz
# resolves: #876108
Patch0: libpipeline-1.2.2-peek-offset.patch
# fixed memory leaks detected by valgrind
Patch1: libpipeline-1.2.2-valgrind.patch
BuildRequires: libtool, check-devel
# FPC exception for gnulib - copylib - https://fedorahosted.org/fpc/ticket/174
@ -38,8 +33,6 @@ to develop programs that use libpipeline library.
%prep
%setup -q
%patch0 -p1 -b .peek-offset
%patch1 -p1 -b .valgrind-mem
%build
%{configure}
@ -67,6 +60,10 @@ rm $RPM_BUILD_ROOT/%{_libdir}/libpipeline.la
%{_mandir}/man3/*
%changelog
* Wed Apr 24 2013 Peter Schiffer <pschiffe@redhat.com> - 1.2.3-1
- resolves: #956003
updated to 1.2.3
* Tue Mar 19 2013 Peter Schiffer <pschiffe@redhat.com> - 1.2.2-4
- fixed memory leaks detected by valgrind

View File

@ -1 +1 @@
4367a3f598d171fd43dfa8620ed16d55 libpipeline-1.2.2.tar.gz
f4866aa3a84f2852c78f87ff619dfc60 libpipeline-1.2.3.tar.gz