Skip to content

Commit f001de7

Browse files
author
PatR
committed
parse_conf_file fix fix
1 parent 089b241 commit f001de7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/files.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* NetHack 3.6 files.c $NHDT-Date: 1574116097 2019/11/18 22:28:17 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.272 $ */
1+
/* NetHack 3.6 files.c $NHDT-Date: 1576626110 2019/12/17 23:41:50 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.276 $ */
22
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
33
/*-Copyright (c) Derek S. Ray, 2015. */
44
/* NetHack may be freely redistributed. See license for details. */
@@ -3160,7 +3160,8 @@ boolean FDECL((*proc), (char *));
31603160
free(buf);
31613161
}
31623162
buf = strcat(tmpbuf, ep);
3163-
buf[sizeof inbuf - 1] = '\0';
3163+
if (strlen(buf) >= sizeof inbuf)
3164+
buf[sizeof inbuf - 1] = '\0';
31643165
}
31653166

31663167
if (morelines || (ignoreline && !oldline))

0 commit comments

Comments
 (0)