[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] libtelnet: do not accept duplicate table entry names
From: |
Erik Auerswald |
Subject: |
[PATCH] libtelnet: do not accept duplicate table entry names |
Date: |
Sat, 12 Feb 2022 20:53:56 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi,
the function "genget()" in the file "libtelnet/genget.c" does not detect
duplicated table entries. Instead it returns the first entry as an "exact
match".
Checking for duplicated command names instead of exiting early on an exact
match would have masked the NULL pointer dereference bugs in setcmd() and
unsetcmd(). As such it could be interpreted as making the code more
robust.
The attached "inetutils-libtelnet-genget-reject_duplicate_commands.patch"
implements duplicate table entry name detection by removing the early exit
on exact match.
Thanks,
Erik
--
Premature optimization is the root of all evil.
-- Donald Knuth
inetutils-libtelnet-genget-reject_duplicate_commands.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] libtelnet: do not accept duplicate table entry names,
Erik Auerswald <=