From 8a3fee7e22d78f8595b23f2e8b46d3cce1cd6418 Mon Sep 17 00:00:00 2001 From: Manfred Schwarb <11859839+manfredsc@users.noreply.github.com> Date: Thu, 27 Aug 2026 11:32:57 +0200 Subject: [PATCH] In CodeTable.c:1370 (code_table_4_3_location), the variable n is conditionally set and then used to calculate the return pointer. In most cases the variable n will not be initialized before use. Similar codes in other tables indicate that probably the variable np is meant instead. Change to use the variable np instead. --- src/CodeTable.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CodeTable.c b/src/CodeTable.c index 3ece7a15..b1f6404e 100644 --- a/src/CodeTable.c +++ b/src/CodeTable.c @@ -1303,7 +1303,7 @@ int code_table_4_3(unsigned char **sec) { * @author Wesley Ebisuzaki @date 2009 */ unsigned char *code_table_4_3_location(unsigned char **sec) { - int pdt, center, n, np; + int pdt, center, np; pdt = GB2_ProdDefTemplateNo(sec); center = GB2_Center(sec); @@ -1367,8 +1367,8 @@ unsigned char *code_table_4_3_location(unsigned char **sec) { case 67: case 68: np = sec[4][19]; - if (np == 255) n = 0; - return sec[4]+20+5*n; + if (np == 255) np = 0; + return sec[4]+20+5*np; case 70: case 71: case 72: