diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2021-12-24 23:01:57 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2021-12-24 23:01:57 +0000 |
commit | 464a0dd848020e2dc9ef681b5e22f275c21e3508 (patch) | |
tree | 5628b7d1da15a749f9dc33febf7e9c81ebc91166 /games | |
parent | 180de804b7b57536b5274bb69a7ae0aa44344ada (diff) |
Filter out all symbols starting with a double underbar. In particular,
this filters out all retguard symbols, which are no fun to guess. One
recognizes them easily but can get yourself hanged by a single digit!
An earlier version filtering only __retguard symbols was
ok deraadt, jsing
guenther agreed that filtering all double underbar symbols makes sense.
He also suggested to filter out symbols containing several consecutive
digits, but how much fun is guessing libcrypto symbols without all the
X509 goodness?
Diffstat (limited to 'games')
-rw-r--r-- | games/hangman/ksyms.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/games/hangman/ksyms.c b/games/hangman/ksyms.c index 12dea84e06f..e68a895cfd6 100644 --- a/games/hangman/ksyms.c +++ b/games/hangman/ksyms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ksyms.c,v 1.12 2019/06/28 13:32:52 deraadt Exp $ */ +/* $OpenBSD: ksyms.c,v 1.13 2021/12/24 23:01:56 tb Exp $ */ /* * Copyright (c) 2008 Miodrag Vallat. @@ -70,6 +70,9 @@ sym_getword(void) /* ignore symbols containing dots or dollar signs */ if (strchr(sym, '.') != NULL || strchr(sym, '$') != NULL) continue; + /* ignore all double unberbar symbols */ + if (strncmp(sym, "__", 2) == 0) + continue; break; } |