Matt Bogosian added the comment:

After some consideration, I think this is probably more correct:

```
--- /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py  
2016-12-17 12:41:21.000000000 -0800
+++ tarfile.py  2017-03-10 14:57:15.000000000 -0800
@@ -2347,9 +2347,10 @@

         # Advance the file pointer.
         if self.offset != self.fileobj.tell():
-            self.fileobj.seek(self.offset - 1)
+            self.fileobj.seek(max(self.offset - 1, 0))
             if not self.fileobj.read(1):
                 raise ReadError("unexpected end of data")
+            self.fileobj.seek(self.offset)

         # Read the next block.
         tarinfo = None
```

But again, I'm no expert here.

----------
Added file: http://bugs.python.org/file46719/tarfile.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29760>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to