• Marko Mäkelä's avatar
    Bug#11849231 inflateInit() invoked without initializing all memory · d23d8b0f
    Marko Mäkelä authored
    According to the zlib documentation, next_in and avail_in
    must be initialized before invoking inflateInit or inflateInit2.
    Furthermore, the zalloc function must clear the allocated memory.
    
    btr_copy_zblob_prefix(): Replace the d_stream parameter with buf,len
    and return the copied length.
    
    page_zip_decompress(): Invoke inflateInit2 a little later.
    
    page_zip_zalloc(): Rename from page_zip_alloc().
    Invoke mem_heap_zalloc() instead of mem_heap_alloc().
    
    rb:619 approved by Jimmy Yang
    d23d8b0f
btr0cur.c 140 KB