pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/35207: net/proftpd 64bit abi (all system)



>Number:         35207
>Category:       pkg
>Synopsis:       net/proftpd 64bit abi (all system)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 08 10:55:00 +0000 2006
>Originator:     Gilles Dauphin
>Release:        SunOS 5.10 i86pc
>Organization:
ENST 
>Environment:


System: SunOS bi.enst.fr 5.10 Generic_118855-19 i86pc


>Description:


proftpd crash at startup when compiled in 64bits
bug is in event,c and pool.c
line in event.c:
 evl_pool = pr_pool_create_sz(event_pool, 64);

the size of 64 is not enought for the 'struct pool' in pool.c when
adresses is 64bits long. The code is not portable.
in pool.c the function pr_pool_create_sz create a block of 64 byte,
but zeroing the new_pool by sizeof(struct pool) (72 byte with amd64) is
not correct.


>How-To-Repeat:


run proftpd


>Fix:


[root@redhot 251] less patches/patch-da
--- src/pool.c.orig     Tue Mar  8 18:06:39 2005
+++ src/pool.c  Fri Dec  8 11:43:28 2006
@@ -363,6 +363,7 @@
 
   pr_alarms_block();
 
+  sz = sz > sizeof(struct pool) ? sz+1 : sizeof(struct pool) +1 ;
   blok = new_block(sz, TRUE);
 
   new_pool = (pool *) blok->h.first_avail;






Home | Main Index | Thread Index | Old Index