Go to file
Vojtech Vitek (V-Teq) 33a815d107 avoid silent data loss when an input line is 2^31 bytes or longer
If one line in a file has length (including newline) of 2^31, then
applying sed -i to that file truncates it to size 0.  I first
noticed it like this: Create a file with line of length 2^31-1
  $ perl -le 'print "v"x(2**31-1)' > k
Then prepend a byte to that line:
  $ sed -i 's/^/v/' k
Surprise!  The file is empty.
* sed/utils.c (ck_getline): Declare "result" to be of type ssize_t,
rather than int, to match the return type of getline.

Upstream 81ce070727b225a1e23e5a48f775811c8a9e7366
by Jim Meyering <meyering@redhat.com>
2011-07-12 16:08:05 +02:00
.gitignore dist-git conversion 2010-07-29 12:20:19 +00:00
sed-4.2.1-copy.patch - fixed make check on non UTF-8 locale - upstream patch rhbz#550731 2010-03-22 12:51:16 +00:00
sed-4.2.1-data-loss.patch avoid silent data loss when an input line is 2^31 bytes or longer 2011-07-12 16:08:05 +02:00
sed-4.2.1-dummyparam.diff Update to version 4.2.1 2009-07-01 10:42:17 +00:00
sed-4.2.1-makecheck.patch - fixed make check on non UTF-8 locale - upstream patch rhbz#550731 2010-03-22 12:51:16 +00:00
sed.spec avoid silent data loss when an input line is 2^31 bytes or longer 2011-07-12 16:08:05 +02:00
sedfaq.txt 4.1.2-2 2004-10-02 19:01:05 +00:00
sources - Use bzipped upstream tarball. 2009-08-12 19:41:07 +00:00