Go Back   Velocity Reviews > Newsgroups > Python
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

Python - Re: Is python buffer overflow proof?

 
Thread Tools Search this Thread
Old 08-03-2009, 08:45 AM   #1
Default Re: Is python buffer overflow proof?


Marcus Wanner schrieb:
> On 8/2/2009 10:43 AM, Christian Heimes wrote:
>> Marcus Wanner wrote:
>>> I believe that python is buffer overflow proof. In fact, I think that
>>> even ctypes is overflow proof...

>>
>> No, ctypes isn't buffer overflow proof. ctypes can break and crash a
>> Python interpreter easily.
>>
>> Christian
>>

> I see. I thought that it said "invalid array index" when you try to
> read/write outside of an array's bounds, though...



But you can cast the resulting pointer to an array of larger size, and
there you are.

Diez


Diez B. Roggisch
  Reply With Quote
Old 08-04-2009, 01:27 PM   #2
Tim Chase
 
Posts: n/a
Default Re: Is python buffer overflow proof?
Marcus Wanner wrote:
> On 8/3/2009 3:45 AM, Diez B. Roggisch wrote:
>> But you can cast the resulting pointer to an array of larger size, and
>> there you are.

>
> Ah, that makes sense. I had forgotten about ctypes.cast().


You *can* shoot yourself in the foot with Python, you just have
to aim much more carefully than you do with C/C++.

-tkc




Tim Chase
  Reply With Quote
Old 08-05-2009, 04:46 AM   #3
sturlamolden
 
Posts: n/a
Default Re: Is python buffer overflow proof?
On Aug 4, 2:27*pm, Tim Chase <python.l...@tim.thechases.com> wrote:

> You *can* shoot yourself in the foot with Python, you just have
> to aim much more carefully than you do with C/C++.


You can e.g. define a class with a __del__ method and make some
circular references. That should give you a nice memory leak.



sturlamolden
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Computer Security aldrich.chappel.com.use@gmail.com A+ Certification 0 11-27-2007 02:11 AM
Death Proof is a loser.... Jordan DVD Video 10 09-29-2007 12:31 AM
Re: YOU ALL NEED TO SEE THIS JAW DROPPING PROOF THAT THE U.S. ADMINISTRATION WAS 100 % BEHIND THE SEPT 11 ATTACKS RichA DVD Video 4 12-03-2005 03:10 PM
YOU ALL NEED TO SEE THIS JAW DROPPING PROOF THAT THE U.S. ADMINISTRATION WAS 100 % BEHIND THE SEPT 11 ATTACKS lharmen DVD Video 1 06-26-2005 07:33 AM
Newbie question - Buffer underruns and Nerovision Express telba most DVD Video 1 03-07-2005 11:14 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46