Added several mail id checks to prevent a map server crash (bugreport:2837).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13571 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
ultramage 2009-03-08 00:10:39 +00:00
parent 2ce2a47adc
commit 541f74494e
2 changed files with 18 additions and 3 deletions

View File

@ -3,6 +3,8 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK. AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2009/03/08
* Added several mail id checks to prevent a map server crash (bugreport:2837)
2009/03/02 2009/03/02
* Blade Stop status no longer prevents item use and equip changing. * Blade Stop status no longer prevents item use and equip changing.
* Against non-players, Blade Stop skill will now only activate if the attacker is at most 2 cells away (1 if barehanded). * Against non-players, Blade Stop skill will now only activate if the attacker is at most 2 cells away (1 if barehanded).

View File

@ -11774,6 +11774,10 @@ void clif_Mail_read(struct map_session_data *sd, int mail_id)
void clif_parse_Mail_read(int fd, struct map_session_data *sd) void clif_parse_Mail_read(int fd, struct map_session_data *sd)
{ {
int mail_id = RFIFOL(fd,2);
if( mail_id <= 0 )
return;
if( mail_invalid_operation(sd) ) if( mail_invalid_operation(sd) )
return; return;
@ -11785,9 +11789,12 @@ void clif_parse_Mail_read(int fd, struct map_session_data *sd)
*------------------------------------------*/ *------------------------------------------*/
void clif_parse_Mail_getattach(int fd, struct map_session_data *sd) void clif_parse_Mail_getattach(int fd, struct map_session_data *sd)
{ {
int i, mail_id = RFIFOL(fd,2); int mail_id = RFIFOL(fd,2);
int i;
bool fail = false; bool fail = false;
if( mail_id <= 0 )
return;
if( mail_invalid_operation(sd) ) if( mail_invalid_operation(sd) )
return; return;
@ -11841,8 +11848,11 @@ void clif_parse_Mail_getattach(int fd, struct map_session_data *sd)
*------------------------------------------*/ *------------------------------------------*/
void clif_parse_Mail_delete(int fd, struct map_session_data *sd) void clif_parse_Mail_delete(int fd, struct map_session_data *sd)
{ {
int i, mail_id = RFIFOL(fd,2); int mail_id = RFIFOL(fd,2);
int i;
if( mail_id <= 0 )
return;
if( mail_invalid_operation(sd) ) if( mail_invalid_operation(sd) )
return; return;
@ -11866,8 +11876,11 @@ void clif_parse_Mail_delete(int fd, struct map_session_data *sd)
*------------------------------------------*/ *------------------------------------------*/
void clif_parse_Mail_return(int fd, struct map_session_data *sd) void clif_parse_Mail_return(int fd, struct map_session_data *sd)
{ {
int i, mail_id = RFIFOL(fd,2); int mail_id = RFIFOL(fd,2);
int i;
if( mail_id <= 0 )
return;
if( mail_invalid_operation(sd) ) if( mail_invalid_operation(sd) )
return; return;