utils/HtmlFonts.cc |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9f8fb7aae92268c9460434abd4d970f04a9af926
Author: Steven Boswell <[email protected]>
Date:   Thu Aug 9 16:16:10 2018 +0200

    HtmlFont: Fix possible uninitialized variable & dangling reference
    
    Bug #107316

diff --git a/utils/HtmlFonts.cc b/utils/HtmlFonts.cc
index 250909b3..97478c3c 100644
--- a/utils/HtmlFonts.cc
+++ b/utils/HtmlFonts.cc
@@ -168,7 +168,7 @@ HtmlFont::HtmlFont(const HtmlFont& x){
    bold=x.bold;
    pos=x.pos;
    color=x.color;
-   if (x.FontName) FontName=new GooString(x.FontName);
+   FontName = (x.FontName) ? new GooString(x.FontName) : nullptr;
    rotOrSkewed = x.rotOrSkewed;
    memcpy(rotSkewMat, x.rotSkewMat, sizeof(rotSkewMat));
  }
@@ -187,7 +187,7 @@ HtmlFont& HtmlFont::operator=(const HtmlFont& x){
    pos=x.pos;
    color=x.color;
    if (FontName) delete FontName;
-   if (x.FontName) FontName=new GooString(x.FontName);
+   FontName = (x.FontName) ? new GooString(x.FontName) : nullptr;
    return *this;
 }
 
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to