summaryrefslogtreecommitdiffstats
path: root/quiz/quiz.c
diff options
context:
space:
mode:
authorcgd <cgd@NetBSD.org>1993-11-17 11:58:40 +0000
committercgd <cgd@NetBSD.org>1993-11-17 11:58:40 +0000
commit30cb2b6cbaced96c2e387e6acd345d88470e644a (patch)
treedb34a7999265b92ea2068787032779a0059f0849 /quiz/quiz.c
parenta872e801961cf10a267ab014aeed9c635aa66a7b (diff)
downloadbsdgames-darwin-30cb2b6cbaced96c2e387e6acd345d88470e644a.tar.gz
bsdgames-darwin-30cb2b6cbaced96c2e387e6acd345d88470e644a.tar.zst
bsdgames-darwin-30cb2b6cbaced96c2e387e6acd345d88470e644a.zip
fix uninitialized variable bug that caused 'quiz function ed-command'
to dump core. from Szabolcs Szigeti <pink@bagira.fsz.bme.hu>
Diffstat (limited to 'quiz/quiz.c')
-rw-r--r--quiz/quiz.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/quiz/quiz.c b/quiz/quiz.c
index c00a6ef0..dddc1c96 100644
--- a/quiz/quiz.c
+++ b/quiz/quiz.c
@@ -42,7 +42,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)quiz.c 5.1 (Berkeley) 11/10/91";*/
-static char rcsid[] = "$Id: quiz.c,v 1.2 1993/08/01 18:52:59 mycroft Exp $";
+static char rcsid[] = "$Id: quiz.c,v 1.3 1993/11/17 11:58:40 cgd Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -310,7 +310,7 @@ appdstr(s, tp)
register int ch;
char *m;
- if ((m = malloc(strlen(sp) + strlen(tp) + 1)) == NULL)
+ if ((m = malloc(strlen(s) + strlen(tp) + 1)) == NULL)
err("%s", strerror(errno));
for (mp = m, sp = s; *mp++ = *sp++;);