[psycopg] #211: Incorrect memory allocation in connection_type.c

"psycopg" <fog-NGVKUo/i/[email protected]>
Newsgroups gmane.comp.python.db.psycopg.devel
Message-ID <[email protected]>
#211: Incorrect memory allocation in connection_type.c
----------------------+-----------------------------------------------------
 Reporter:  ctheune   |       Owner:  fog          
     Type:  defect    |      Status:  new          
 Priority:  high      |   Milestone:  PSYCOPG 2.0.7
Component:  psycopg2  |     Version:  2.0.5        
 Severity:  critical  |    Keywords:               
----------------------+-----------------------------------------------------
 Setting the client encoding to a string that does not contain an
 underscore or dash ('_', '-') causes an incorrect memory allocation
 because strlen() is used for memory allocation where strlen()+1 needs to
 be used.

 The attached patch fixes the problem.

 The crash only appears stochastically but causes segfaults on a somewhat
 busy Zope server within less than 6-10 hours.

 Note: This is actually an error in version 2.0.6 but the dropdown doesn't
 have this for a choice.

-- 
Ticket URL: <http://www.initd.org/tracker/psycopg/ticket/211>
psycopg <http://initd.org/>
psycopg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.