summaryrefslogtreecommitdiff
path: root/src/char_sql/int_party.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-22 11:02:26 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-22 11:02:26 +0000
commitb826bc2c54dbe6a2ad0f204f36f82bf116d8e663 (patch)
tree9edb0690c8a2ecfeb6db3723d397f6fbb4f53967 /src/char_sql/int_party.c
parent5bcbc87fbfe3d2b9182d6e7edd84083758b880a5 (diff)
downloadhercules-b826bc2c54dbe6a2ad0f204f36f82bf116d8e663.tar.gz
hercules-b826bc2c54dbe6a2ad0f204f36f82bf116d8e663.tar.bz2
hercules-b826bc2c54dbe6a2ad0f204f36f82bf116d8e663.tar.xz
hercules-b826bc2c54dbe6a2ad0f204f36f82bf116d8e663.zip
* Added 'safestrnlen' to prevent null pointer crashes
* Fixed global chat logging always crashing on a null pointer * Applied changes to clif_parse_globalmessage() from my WiP code - clearer processing of the individual packet components - proper code ordering, some more integrity checks - fixes to some poorly chosen ShowWarning() format strings - global chat logging no longer logs the entire string (w/ player name) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11271 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/int_party.c')
-rw-r--r--src/char_sql/int_party.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/char_sql/int_party.c b/src/char_sql/int_party.c
index f6d783b3b..fd1f0c37c 100644
--- a/src/char_sql/int_party.c
+++ b/src/char_sql/int_party.c
@@ -299,7 +299,7 @@ struct party_data* search_partyname(char* str)
char* data;
struct party_data* p = NULL;
- Sql_EscapeStringLen(sql_handle, esc_name, str, strnlen(str, NAME_LENGTH));
+ Sql_EscapeStringLen(sql_handle, esc_name, str, safestrnlen(str, NAME_LENGTH));
if( SQL_ERROR == Sql_Query(sql_handle, "SELECT `party_id` FROM `%s` WHERE `name`='%s'", party_db, esc_name) )
Sql_ShowDebug(sql_handle);
else if( SQL_SUCCESS == Sql_NextRow(sql_handle) )