Skip to content

Commit 04e7a9d

Browse files
authored
Merge pull request sirdude#41 from evilmog/patch-1
Update telnet.c
2 parents 92da140 + 8cce75e commit 04e7a9d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/sys/lib/telnet.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,14 @@ static void telnet_subnegotiation(string subnegotiation) {
9999
static void receive(mixed tls, string str) {
100100
string *strings, head, pre;
101101
int i, len;
102+
string rc;
102103

103104
/* find telnet commands in input */
104-
({ strings, partial }) = TELNET_PARSER->parse_telnet(partial + str);
105+
/* stop jerks from running cat /dev/urandom | nc mudname 4000 and crashing */
106+
rc = catch(({ strings, partial }) = TELNET_PARSER->parse_telnet(partial + str));
107+
if (rc) {
108+
destruct_object(this_player());
109+
}
105110

106111
for (i = 0; i < sizeof(strings); i++) {
107112
/*

0 commit comments

Comments
 (0)