From: tb Date: Fri, 24 Dec 2021 23:01:56 +0000 (+0000) Subject: Filter out all symbols starting with a double underbar. In particular, X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b5a76aaea737e1989dfbb6693b09f3b2d814c5d0;p=openbsd 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? --- 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; }