diff options
author | Alexis Ballier <aballier@gentoo.org> | 2007-11-19 19:47:44 +0000 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2007-11-19 19:47:44 +0000 |
commit | 19d486373e93f93816e3ca59d2ac346d3c4b2345 (patch) | |
tree | 097932be6cd9e69c002b4d8db8a9c92c02118c4b /media-video/vamps/files | |
parent | Block httpclient (http-access2 replacement). (diff) | |
download | gentoo-2-19d486373e93f93816e3ca59d2ac346d3c4b2345.tar.gz gentoo-2-19d486373e93f93816e3ca59d2ac346d3c4b2345.tar.bz2 gentoo-2-19d486373e93f93816e3ca59d2ac346d3c4b2345.zip |
add a patch that fixes a bug that would give invalid premature eof errors, thanks to Daniel Pielmeier <daniel.pielmeier@googlemail.com>, bug #175504
(Portage version: 2.1.3.19)
Diffstat (limited to 'media-video/vamps/files')
-rw-r--r-- | media-video/vamps/files/digest-vamps-0.99.2-r1 | 3 | ||||
-rw-r--r-- | media-video/vamps/files/vamps-0.99.2-premature-eof.patch | 46 |
2 files changed, 49 insertions, 0 deletions
diff --git a/media-video/vamps/files/digest-vamps-0.99.2-r1 b/media-video/vamps/files/digest-vamps-0.99.2-r1 new file mode 100644 index 000000000000..2607b4916eb3 --- /dev/null +++ b/media-video/vamps/files/digest-vamps-0.99.2-r1 @@ -0,0 +1,3 @@ +MD5 7d438185a2ae95ebb245472d9fa47d06 vamps-0.99.2.tar.gz 47062 +RMD160 1b0d34ba3b583d9d35fc4cee30014c704e64a36d vamps-0.99.2.tar.gz 47062 +SHA256 9bac71441db55c04a642c786d6427efdb65aa27f4b1719ffa34ebc3869572694 vamps-0.99.2.tar.gz 47062 diff --git a/media-video/vamps/files/vamps-0.99.2-premature-eof.patch b/media-video/vamps/files/vamps-0.99.2-premature-eof.patch new file mode 100644 index 000000000000..48340498d9bc --- /dev/null +++ b/media-video/vamps/files/vamps-0.99.2-premature-eof.patch @@ -0,0 +1,46 @@ +--- vamps-0.99.2/vamps/vamps.c.orig 2006-04-15 08:00:07.000000000 -0400 ++++ vamps-0.99.2/vamps/vamps.c 2007-01-26 06:54:27.000000000 -0500 +@@ -18,6 +18,9 @@ + // + // Revision history (latest first): + // ++// 2007/01/26: V0.99.3: Fixed assumptions in lock() which do not hold for pipes. ++// This cures the "Premature EOF" problem. ++// + // 2006/04/15: V0.99.2: Fixed some signed/unsigned issues which caused compiler + // warnings on some platforms. No funtional changes. + // +@@ -396,13 +399,24 @@ + rhwp = rptr + avail; + } + +- n = read (0, rhwp, RBUF_SIZE - avail); +- +- if (n % SECT_SIZE) +- fatal ("Premature EOF"); +- +- rhwp += n; +- bytes_read += n; ++ while (avail < size) ++ { ++ // read; reads from an open pipe will return any non-zero amount of data ++ // (not necessarily the amount we wanted!) ++ n = read (0, rhwp, RBUF_SIZE - avail); ++ if (!n) ++ { ++ if (avail % SECT_SIZE) ++ // we got an EOF and only a partial sector ++ fatal ("Premature EOF"); ++ break; ++ } ++ else if (n == -1) ++ fatal ("Read from stdin: %s", strerror (errno)); ++ rhwp += n; ++ bytes_read += n; ++ avail += n; ++ } + + return !n; + } + + |