----- Forwarded message from Lasse Collin <lasse.collin@tukaani> -----
Date: Sat, 13 Sep 2008 19:08:21 +0300
From: Lasse Collin <lasse.collin@tukaani>
To: Alexey Tourbin <at@altlinux>
Subject: Re: v4.999.5alpha LZMA_STREAM_INIT_VAR
Alexey Tourbin wrote:
> On Sat, Sep 13, 2008 at 01:17:42PM +0300, Lasse Collin wrote:
> > Alexey Tourbin wrote:
> > > rpm5.org/rpmio/lzdio.c:
> > > 81 lzfile = calloc(1, sizeof(*lzfile));
> > > 82 if (!lzfile) {
> > > 83 (void) fclose(fp);
> > > 84 return NULL;
> > > 85 }
> > > 86 lzfile->fp = fp;
> > > 87 lzfile->encoding = encoding;
> > > 88 lzfile->eof = 0;
> > > 89 lzfile->strm = LZMA_STREAM_INIT_VAR;
> >
> > You can use for example memset(&lzfile->strm, 0,
> > sizeof(lzfile->strm)). See the comment of LZMA_STREAM_INIT in
> > src/liblzma/api/lzma/base.h for details.
>
> There's a calloc() call which is already there, which means there's
> no need to explicitly invoke memset. But LZMA_STREAM_INIT_VAR has
> been there for a while.
Oh, I didn't read the code carefully, sorry.
If the previous liblzma version you built against was 4.999.3alpha, you
will have bunch of other problems too. For example, the protoypes of
lzma_alone_encode() and lzma_alone_decoder() have changed.
> May I perhaps forward your message to rpm5.org developemnt list?
> (So that we can fix the code in some way.)
Sure. I can go and idle on #rpm@Freenode for a while too.
--
Lasse Collin | IRC: Larhzu @ IRCnet & Freenode
----- End forwarded message -----
- application/pgp-signature attachment: stored
Received on Sun Sep 14 10:58:37 2008