[gs-commits] ghostpdl branch, master, updated. jbig2dec-0.14-1743-g1bb7a14

[email protected] (Chris Liddell) Wed, 23 Oct 2019 09:16:43 +0000 (UTC)
Newsgroups gmane.comp.printing.ghostscript.cvs
Message-ID <[email protected]>
The ghostpdl branch, master has been updated
       via  1bb7a148bc6a4e4a8736d27a937465aab95069e5 (commit)
      from  6d7243cea061373f592a6d9113626393ff0eb7d8 (commit)

----------------------------------------------------------------------
commit 1bb7a148bc6a4e4a8736d27a937465aab95069e5
Author: Chris Liddell <[email protected]>
Date:   Wed Oct 23 10:02:02 2019 +0100

    Revision for a34130a136fa that will actually work
    
    The Coverity report was misleading, and I missed a compiler warning with
    commit a34130a136fa.
    
    This resolves the compiler warning, and should keep coverity happy.

diff --git a/base/gstype42.c b/base/gstype42.c
index 1000373..3b8761d 100644
--- a/base/gstype42.c
+++ b/base/gstype42.c
@@ -773,17 +773,16 @@ gs_type42_find_post_name(gs_font_type42 * pfont, gs_glyph glyph, gs_string *gnam
                     if (gind < numglyphs) {
                         offs = pfont->data.post_offset + 34 + numglyphs * 2;
                        for (i = 0; i < numglyphs; i++) {
-                           byte len;
                            if (i == gind) {
-                               READ_SFNTS(pfont, offs, 1, len);
-                               code = pfont->data.string_proc(pfont, offs + 1, len, (const byte **)&(gname->data));
+                               READ_SFNTS(pfont, offs, 1, val);
+                               code = pfont->data.string_proc(pfont, offs + 1, (uint)val[0], (const byte **)&(gname->data));
                                if (code > 0)
-                                   gname->size = len;
+                                   gname->size = val[0];
                                break;
                            }
                            else {
-                               READ_SFNTS(pfont, offs, 1, len);
-                               offs += len + 1;
+                               READ_SFNTS(pfont, offs, 1, val);
+                               offs += (uint)val[0] + 1;
                            }
                        }
                     }


Summary of changes:
 base/gstype42.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)