[Scipy-tickets] [SciPy] #1564: Integer overflows cause segfault in linkage function with large input

SciPy Trac scipy-tickets@scipy....
Sun Feb 5 14:57:28 CST 2012


#1564: Integer overflows cause segfault in linkage function with large input
---------------------------+------------------------------------------------
 Reporter:  laserson       |       Owner:  somebody    
     Type:  defect         |      Status:  needs_review
 Priority:  high           |   Milestone:  0.11.0      
Component:  scipy.cluster  |     Version:  devel       
 Keywords:  linkage        |  
---------------------------+------------------------------------------------

Comment(by warren.weckesser):

 In commit:7c03d21d84190f7ca4277b72caba5288d2928381, I added checks for
 failure of malloc(), so you'll get a MemoryError exception instead of a
 segfault.

 That change doesn't really fix the problem of integer overflow reported
 here--it just means you won't get a segfault when the overflowed value
 happens to be negative.

 I haven't looked into this problem too deeply.  I don't know if the patch
 is sufficient to fix the problem robustly, especially since in Microsoft C
 compilers, 'int' and 'long' are both 32 bits.

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1564#comment:3>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list