This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author posita
Recipients lars.gustaebel, posita
Date 2017-03-10.20:31:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1489177863.18.0.991353420333.issue29760@psf.upfronthosting.co.za>
In-reply-to
Content
This patch (also attached) seems to address this particular use case:

```
--- a/Lib/tarfile.py	2016-12-17 12:41:21.000000000 -0800
+++ b/Lib/tarfile.py	2017-03-10 12:23:34.000000000 -0800
@@ -2347,7 +2347,7 @@
 
         # 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")
 
```

However, I am unfamiliar with the code, especially in light of #24259, and haven't tested it thoroughly. Oversight is needed.
History
Date User Action Args
2017-03-10 20:31:03positasetrecipients: + posita, lars.gustaebel
2017-03-10 20:31:03positasetmessageid: <1489177863.18.0.991353420333.issue29760@psf.upfronthosting.co.za>
2017-03-10 20:31:03positalinkissue29760 messages
2017-03-10 20:31:03positacreate