On Tue, Apr 04, 2006 at 01:22:33AM +0200, Josip Rodin wrote:
> On Mon, Apr 03, 2006 at 06:51:39PM -0400, Daniel Jacobowitz wrote:
> > Package: joe
> > Version: 3.3-3
> > Severity: grave
> > Justification: renders package unusable
> > 
> > The changelog says this release fixed a bug which caused Joe to crash at
> > startup if HOME was unset.  Well, now it crashes if HOME is set; a NULL
> > pointer is passed to sprintf where the home directory is obviously wanted.
> 
> What? I can't reproduce that on my poor old normal sarge system.
> Can you please point me to the exact point in code where this breaks for you?

It may be something catastrophic that has gone wrong in the amd64
archive rebuild?  It definitely did not happen with my previously
installed 3.3-2, this afternoon.  I switched to the http.us.debian.org
archive today and upgraded to 3.3-3 and it exploded.

However, I can rebuild from source and reproduce it.  Ah, I see.

1300            p = (unsigned char *)getenv("HOME");
1301            f = 0;
1302            if (p) {
1303                    joe_snprintf_2((char 
*)buf,sizeof(buf),"%s/.joe/charmaps/%s",p,name);
1304                    f = fopen((char *)buf,"r");
1305            }

We're at line 1303 and p == NULL.

charmap.c: In function 'find_charmap':
charmap.c:1300: warning: cast to pointer from integer of different size

If you want to use getenv, please, please, please, include its
prototype.  It looks like HAVE_STDLIB_H has not gotten set, presumably
because nothing has bothered to include autoconf.h before testing it.

If you include config.h first, this works.  I saw similar warnings when
building termcap.c and i18n.c.  i18n.c is also missing config.h, but
adding it does not fix the warnings.

termcap.c: In function 'jgetstr':
termcap.c:414: warning: cast to pointer from integer of different size
termcap.c: In function 'texec':
termcap.c:519: warning: cast to pointer from integer of different size
i18n.c: In function 'joe_towupper':
i18n.c:2723: warning: cast to pointer from integer of different size
i18n.c:2724: warning: cast to pointer from integer of different size
i18n.c: In function 'joe_towlower':
i18n.c:3517: warning: cast to pointer from integer of different size
i18n.c:3518: warning: cast to pointer from integer of different size

So, there are probably other problems lurking.

There's some good warnings in -Wall for this... but the result of
compiling joe with -Wall is not confidence-inspiring.

-- 
Daniel Jacobowitz
CodeSourcery


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to