New submission from Ross Lagerwall <rosslagerw...@gmail.com>:

If a mmap length 0 is used and an offset is used as well, the size to mmap() is 
calculated as the size of the file instead of the size of the file minus 
offset. This means that trying to access a certain part does not result in an 
index error but a segfault (bus error).

Attached is a patch that fixes the issue + a unit test.

----------
components: Extension Modules
files: mmap.patch
keywords: patch
messages: 126334
nosy: amaury.forgeotdarc, loewis, pitrou, r.david.murray, rosslagerwall
priority: normal
severity: normal
status: open
title: mmap segfault
type: crash
versions: Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file20415/mmap.patch

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

Reply via email to