Skip to content

Commit

Permalink
Merge pull request #349 from olebole/noirlab-spp
Browse files Browse the repository at this point in the history
NOIRLAB: Potential xc/xpp string overflow fixes
  • Loading branch information
olebole committed Jan 28, 2024
2 parents 6f4e157 + 9b67cd7 commit 8da26b9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion unix/boot/spp/xc.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ char f2cpath[SZ_FNAME] = "/usr/bin/f2c";
char g77path[SZ_FNAME] = "/usr/bin/g77";

char outfile[SZ_FNAME] = "";
char tempfile[SZ_FNAME] = "";
char tempfile[SZ_PATHNAME] = "";
char *lflags[MAXFLAG+1];
char *lfiles[MAXFILE+1]; /* all files */
char *hlibs[MAXFILE+1]; /* host libraries */
Expand Down
4 changes: 2 additions & 2 deletions unix/boot/spp/xpp/decl.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ d_newproc (
/* Enter argument name into the symbol table.
*/
if (d_lookup (tokstr) != NULL) {
char lbuf[200];
char lbuf[512];
sprintf (lbuf, "%s.%s multiply declared",
procname, tokstr);
xpp_warn (lbuf);
Expand Down Expand Up @@ -169,7 +169,7 @@ d_declaration (int dtype)
else if (sp->s_flags & S_ARGUMENT && sp->s_dtype == UNDECL)
sp->s_dtype = dtype;
else {
char lbuf[200];
char lbuf[512];
sprintf (lbuf, "%s.%s multiply declared",
procname, tokstr);
xpp_warn (lbuf);
Expand Down
2 changes: 1 addition & 1 deletion unix/boot/spp/xpp/xppcode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1480,7 +1480,7 @@ void
do_hollerith (void)
{
register char *op;
char strbuf[SZ_LINE], outbuf[SZ_LINE];
char strbuf[SZ_LINE], outbuf[SZ_LINE+2];
int len;

/* Read the string into strbuf. */
Expand Down

0 comments on commit 8da26b9

Please sign in to comment.