Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:olh:SLE_11
python.6852
CVE-2014-7185-buffer-wraparound.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File CVE-2014-7185-buffer-wraparound.patch of Package python.6852
# HG changeset patch # User Benjamin Peterson <benjamin@python.org> # Date 1403579547 25200 # Node ID 8d963c7db507be561e26bbbb852e3a2be3327c3f # Parent 8e0b7393e921fb5e05c40265f9272dec90512ef6 avoid overflow with large buffer sizes and/or offsets (closes #21831) Index: Python-2.6.9/Lib/test/test_buffer.py =================================================================== --- Python-2.6.9.orig/Lib/test/test_buffer.py 2013-10-29 16:04:38.000000000 +0100 +++ Python-2.6.9/Lib/test/test_buffer.py 2014-10-01 17:35:10.092317892 +0200 @@ -4,6 +4,7 @@ """ +import sys import unittest from test import test_support @@ -21,6 +22,11 @@ self.assertEqual(b[start:stop:step], s[start:stop:step]) + def test_large_buffer_size_and_offset(self): + data = bytearray('hola mundo') + buf = buffer(data, sys.maxsize, sys.maxsize) + self.assertEqual(buf[:4096], "") + def test_main(): with test_support._check_py3k_warnings(("buffer.. not supported", Index: Python-2.6.9/Objects/bufferobject.c =================================================================== --- Python-2.6.9.orig/Objects/bufferobject.c 2013-10-29 16:04:39.000000000 +0100 +++ Python-2.6.9/Objects/bufferobject.c 2014-10-01 17:35:10.093317897 +0200 @@ -88,7 +88,7 @@ *size = count; else *size = self->b_size; - if (offset + *size > count) + if (*size > count - offset) *size = count - offset; } return 1;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor