summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjlemon <jlemon@FreeBSD.org>1997-08-18 20:26:32 +0000
committerjlemon <jlemon@FreeBSD.org>1997-08-18 20:26:32 +0000
commitb88565f4e1b34b84badb742bc92f58d571e04253 (patch)
tree02829ca76053a9ac25be636522a1c89a595e9365
parent0aabeac27664d50b8dfd12654c1b1eb7f65bdb29 (diff)
downloadFreeBSD-src-b88565f4e1b34b84badb742bc92f58d571e04253.zip
FreeBSD-src-b88565f4e1b34b84badb742bc92f58d571e04253.tar.gz
A ':' in the data file was always interpreted as a category divider,
even if escaped. Changed code so that the next character after a '\' is skipped. This should not cause a buffer overflow, as backslashes at the end of a line are handled earlier in the code. Also correct a slight grammatical nit in the bard datfile. PR: 3777, 3917
-rw-r--r--games/quiz/datfiles/bard2
-rw-r--r--games/quiz/quiz.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/games/quiz/datfiles/bard b/games/quiz/datfiles/bard
index 56c76ed..1dad4bf 100644
--- a/games/quiz/datfiles/bard
+++ b/games/quiz/datfiles/bard
@@ -212,7 +212,7 @@ Antony [and|&] Cleopatra{ II-iii}:\
Enobarbus
Give me some music\: music, moody food:\
Of us that trade in love{.}:\
-Antony [and|&] Cleopatra{II-v}:\
+Antony [and|&] Cleopatra{ II-v}:\
Cleopatra
'Tis better playing with a lion's whelp,:\
Than with an old one dying{.}:\
diff --git a/games/quiz/quiz.c b/games/quiz/quiz.c
index de0393e..d6291a5 100644
--- a/games/quiz/quiz.c
+++ b/games/quiz/quiz.c
@@ -299,6 +299,7 @@ next_cat(s)
case '\0':
return (NULL);
case '\\':
+ s++;
break;
case ':':
return (s);
OpenPOWER on IntegriCloud