From 42c4478a884d95cef4780c0ce787b2c92b23b3ab Mon Sep 17 00:00:00 2001 From: Mike Fitzpatrick Date: Sat, 30 Sep 2023 20:33:59 -0700 Subject: [PATCH 1/2] string buffer fix in mii_readc --- pkg/system/help/helpdb.x | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/system/help/helpdb.x b/pkg/system/help/helpdb.x index 04af40db4..d4e5ee6bd 100644 --- a/pkg/system/help/helpdb.x +++ b/pkg/system/help/helpdb.x @@ -1041,7 +1041,7 @@ begin else call pargstr ("") call pargstr (Memc[date]) - call pargstr (FI_OWNER(fi)) + call pargl (FI_OWNER(fi)) call pargstr (DBI_KEY(ix)) if (verbose) { @@ -1187,7 +1187,7 @@ begin # Get string buffer. op = op + nelem nelem = HD_SZSBUF(hp) # / (SZ_INT / SZ_INT32) - if (mii_readc (fd, Memi[op], nelem) < nelem) + if (mii_readc (fd, Memc[P2C(op)], nelem) < nelem) goto readerr_ nr = nr + ((nelem + SZ_STRUCT32-1) / SZ_STRUCT32) From 854b1c05d2d5c314b709a356e7985674a0b4559e Mon Sep 17 00:00:00 2001 From: Mike Fitzpatrick Date: Sat, 30 Sep 2023 20:31:18 -0700 Subject: [PATCH 2/2] removed unused decl and pargstr fix --- pkg/system/help/helpdb.x | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/system/help/helpdb.x b/pkg/system/help/helpdb.x index d4e5ee6bd..d5f608c93 100644 --- a/pkg/system/help/helpdb.x +++ b/pkg/system/help/helpdb.x @@ -976,10 +976,10 @@ begin next } - call fprintf (fd, "Help database %s created %s by %s, size=%d\n") + call fprintf (fd, "Help database %s created %s by %d, size=%d\n") call pargstr (Memc[fname]) call pargstr (Memc[date]) - call pargstr (FI_OWNER(fi)) + call pargl (FI_OWNER(fi)) call pargl (FI_SIZE(fi)) } call fntclsb (list) @@ -1161,7 +1161,7 @@ int fd #I input file pointer obuf #O receives unpacked helpdir data int buflen #O max su out -int i, nelem, nr, sz_mii_struct +int nelem, nr, sz_mii_struct pointer op, hp int mii_readi(), mii_readc() errchk mii_readi, mii_readc