Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOIRLAB: string buffer fix in mii_readc in "help" package #355

Merged
merged 2 commits into from
Jan 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pkg/system/help/helpdb.x
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down
Loading