[poppler] Heap corruption caused by wrong JPXStream import

Albert Astals Cid aacid at kde.org
Sun Jul 5 07:03:44 PDT 2015


El Diumenge, 5 de juliol de 2015, a les 13:59:05, Adam Reichold va escriure:
> Hello,
> 
> Am 05.07.2015 um 13:48 schrieb Albert Astals Cid:
> > Right, can you confirm this fixes the problem?
> > 
> > diff --git a/CMakeLists.txt b/CMakeLists.txt
> > index f77e366..1618e1c 100644
> > --- a/CMakeLists.txt
> > +++ b/CMakeLists.txt
> > @@ -158,6 +158,7 @@ if(ENABLE_ZLIB)
> > 
> >  endif(ENABLE_ZLIB)
> >  set(USE_OPENJPEG1 FALSE)
> >  set(USE_OPENJPEG2 FALSE)
> > 
> > +set(WITH_OPENJPEG FALSE)
> > 
> >  if(ENABLE_LIBOPENJPEG STREQUAL "auto")
> >  
> >    find_package(LIBOPENJPEG)
> >    set(USE_OPENJPEG1 ${LIBOPENJPEG_FOUND})
> > 
> > @@ -176,6 +177,7 @@ elseif(ENABLE_LIBOPENJPEG STREQUAL "openjpeg2")
> > 
> >    set(USE_OPENJPEG2 ${LIBOPENJPEG2_FOUND})
> >    set(WITH_OPENJPEG ${LIBOPENJPEG2_FOUND})
> >  
> >  endif()
> > 
> > +set(ENABLE_LIBOPENJPEG "${WITH_OPENJPEG}")
> > 
> >  if(ENABLE_CMS STREQUAL "auto")
> >  
> >    find_package(LCMS2)
> >    set(USE_CMS ${LCMS2_FOUND})
> 
> Yes, this seems to fix the problem. So does this mean the user-specified
> string "ENABLE_LIBOPENJPEG" was always implicitly converted to the
> Boolean "ENABLED_LIBOPENJPEG" used in the header? So that the default
> "auto" would also always mean "1"?

Yep.

I'll commit the fix.

Cheers,
  Albert

> 
> Best regards, Adam.



More information about the poppler mailing list