[poppler] A minor improvement

Albert Astals Cid aacid at kde.org
Tue Sep 25 15:54:02 PDT 2012


El Dilluns, 24 de setembre de 2012, a les 16:36:58, 王璐 va escriure:
> Hello
> 
> I guess it's too trivial to worth filing a bug
> 
> At line 2027
> if(!strObj.isStream())
>  goto err1;
> 
> Then strObj.streamClose() right after err1 will crash.

Fixed, thanks for the patch.

Cheers,
  Albert

> 
> - Lu
> 
> ////////////////////////////////////////
> //// patch
> 
> diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
> index 93b078a..cbbad1e 100644
> --- a/poppler/PSOutputDev.cc
> +++ b/poppler/PSOutputDev.cc
> @@ -2148,7 +2148,8 @@ void PSOutputDev::setupEmbeddedType1Font(Ref *id,
> GooString *psName) {
>    writePS("%%EndResource\n");
> 
>   err1:
> -  strObj.streamClose();
> +  if (strObj.isStream())
> +      strObj.streamClose();
>    strObj.free();
>  }


More information about the poppler mailing list