From 2ee911312cf1793361aac48fb016a63161197516 Mon Sep 17 00:00:00 2001 From: zephyrus Date: Fri, 17 Apr 2009 22:59:41 +0000 Subject: - Critical crash fix. Please update your servers. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13678 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/clif.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/map/clif.c b/src/map/clif.c index 61db7f26e..abc782b49 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -9796,6 +9796,9 @@ void clif_parse_NpcStringInput(int fd, struct map_session_data* sd) int message_len = RFIFOW(fd,2)-8; int npcid = RFIFOL(fd,4); const char* message = (char*)RFIFOP(fd,8); + + if( message_len < 0 ) + message_len = 0; safestrncpy(sd->npc_str, message, min(message_len,CHATBOX_SIZE)); npc_scriptcont(sd, npcid); -- cgit v1.2.3-70-g09d2