schwer-q / xar

Automatically exported from code.google.com/p/xar
0 stars 0 forks source link

Randomly initialized rsize in xar_attrcopy_from_heap #41

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
in io.c (rev 188), line 420:

    bsize = def_bsize;
    inbuf = malloc(bsize);
    if( !inbuf ) {

def_bsize is not longer initialized (du to stream patch changed) so bsize is 
initialized with 
garbage.

I think you should change the line 395:
bsize = get_rsize(x);

into 
def_bsize = get_rsize(x);

as def_bsize is reused later in this function and is expected to contain the 
archive rsize default 
value.

Original issue reported on code.google.com by jddu...@gmail.com on 16 Oct 2007 at 7:10

GoogleCodeExporter commented 9 years ago
Thanks for pointing this out.  This should be resolved in the way you mentioned 
in
commit 189.

Original comment by bbraun on 16 Oct 2007 at 7:16