Subject: malloc error under AIX solution

From: Dan Foster <[email-masked]>
Date: Tue, 2 Mar 1999 18:07:50 -0500 (EST)

For wu-ftpd VR releases (I tested against VR14, but it looks like it'd possibly
be applicable against other VR releases as well), the fix is to:

edit line 3843 of src/ftpd.c, and change from:

    size_t size_t_blksize;

to:

    off_t size_t_blksize;

Then recompile and reinstall. It should then work.

The cause? (researched and tested this time around :) )

If AIX v4.2 and later, *AND* -D_LARGE_FILES is enabled (which -D_AIX42 turns
on, I believe?), then off_t is a 'long long'.

And this is what blksize is defined as (off_t). size_t under AIX is always
a 'long'.

To sum it up, it was trying to stuff a variable defined as 'long long' into
another variable defined as 'long', resulting in garbage. malloc() didn't
like the nonsense values it got too much (many gigs of memory), so it failed.

-Dan

---

From: Gregory A Lundberg <[email-masked]>
Date: Tue, 2 Mar 1999 18:40:12 -0500 (EST)

On Tue, 2 Mar 1999, Dan Foster wrote:

> For wu-ftpd VR releases (I tested against VR14, but it looks like it'd
> possibly be applicable against other VR releases as well), the fix is
> to:
> 

the other people working on AIX found the largefile problem.  It should be
fixed in VR15.  Is it not?

-- 

Gregory A Lundberg              Senior Partner, VRnet Company
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195