Skip to content

Commit c670fe2

Browse files
committed
fixed used of uncontrolled format strings
Fixing code scan security bugs reported by: https://github.com/lcn2/rogue5.4/security/code-scanning/2 and: https://github.com/lcn2/rogue5.4/security/code-scanning/3
1 parent 819dd54 commit c670fe2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

command.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ command(void)
287287
else
288288
after = FALSE;
289289
when 'D': after = FALSE; discovered();
290-
when CTRL('P'): after = FALSE; msg(huh);
290+
when CTRL('P'): after = FALSE; msg("%s", huh);
291291
when CTRL('R'):
292292
after = FALSE;
293293
clearok(curscr,TRUE);

wizard.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ whatis(int insist, int type)
6969
when RING:
7070
set_know(obj, ring_info);
7171
}
72-
msg(inv_name(obj, FALSE));
72+
msg("%s", inv_name(obj, FALSE));
7373
}
7474

7575
/*

0 commit comments

Comments
 (0)