소스 검색

* Fixed char-server making assumptions about RFIFO data length in character deletion packet (since r10909).
* Fixed login-server discarding RFIFO data, when the length is 1 byte; minimum packet size is 2 bytes (since r5027).
- Fixed login-server not skipping packet 0x2728's data on failure (since r12043).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14637 54d463be-8e91-2dee-dedb-b68131a5f0ec

ai4rei 14 년 전
부모
커밋
b7c868ef79
5개의 변경된 파일7개의 추가작업 그리고 8개의 파일을 삭제
  1. 3 0
      Changelog-Trunk.txt
  2. 1 1
      src/char/char.c
  3. 1 1
      src/char_sql/char.c
  4. 1 1
      src/login/admin.c
  5. 1 5
      src/login/login.c

+ 3 - 0
Changelog-Trunk.txt

@@ -1,6 +1,9 @@
 Date	Added
 
 2010/12/28
+	* Fixed char-server making assumptions about RFIFO data length in character deletion packet (since r10909). [Ai4rei]
+	* Fixed login-server discarding RFIFO data, when the length is 1 byte; minimum packet size is 2 bytes (since r5027).
+	- Fixed login-server not skipping packet 0x2728's data on failure (since r12043).
 	* Removed unmaintained and broken 'adduser' tool (topic:262284). [Ai4rei]
 2010/12/27
 	* Fixed skill_can_produce_mix not checking, whether or not the produced goods can actually be stored (bugreport:4674). [Ai4rei]

+ 1 - 1
src/char/char.c

@@ -3550,7 +3550,7 @@ int parse_char(int fd)
 
 			ShowInfo(CL_RED"Request Char Deletion: "CL_GREEN"%d (%d)"CL_RESET"\n", sd->account_id, cid);
 			memcpy(email, RFIFOP(fd,6), 40);
-			RFIFOSKIP(fd,RFIFOREST(fd)); // hack to make the other deletion packet work
+			RFIFOSKIP(fd,( cmd == 0x68 ) ? 46 : 56);
 
 			if (e_mail_check(email) == 0)
 				safestrncpy(email, "a@a.com", sizeof(email)); // default e-mail

+ 1 - 1
src/char_sql/char.c

@@ -3256,7 +3256,7 @@ int parse_char(int fd)
 
 			ShowInfo(CL_RED"Request Char Deletion: "CL_GREEN"%d (%d)"CL_RESET"\n", sd->account_id, cid);
 			memcpy(email, RFIFOP(fd,6), 40);
-			RFIFOSKIP(fd,RFIFOREST(fd)); // hack to make the other deletion packet work
+			RFIFOSKIP(fd,( cmd == 0x68) ? 46 : 56);
 			
 			// Check if e-mail is correct 
 			if(strcmpi(email, sd->email) && //email does not matches and 

+ 1 - 1
src/login/admin.c

@@ -852,6 +852,6 @@ int parse_admin(int fd)
 			return 0;
 		}
 	}
-	RFIFOSKIP(fd,RFIFOREST(fd));
+
 	return 0;
 }

+ 1 - 5
src/login/login.c

@@ -524,8 +524,6 @@ int parse_fromchar(int fd)
 		break;
 
 		case 0x2719: // ping request from charserver
-			if( RFIFOREST(fd) < 2 )
-				return 0;
 			RFIFOSKIP(fd,2);
 
 			WFIFOHEAD(fd,2);
@@ -733,8 +731,8 @@ int parse_fromchar(int fd)
 				// Sending information towards the other char-servers.
 				RFIFOW(fd,0) = 0x2729;// reusing read buffer
 				charif_sendallwos(fd, RFIFOP(fd,0), RFIFOW(fd,2));
-				RFIFOSKIP(fd,RFIFOW(fd,2));
 			}
+			RFIFOSKIP(fd,RFIFOW(fd,2));
 		}
 		break;
 
@@ -854,7 +852,6 @@ int parse_fromchar(int fd)
 		} // switch
 	} // while
 
-	RFIFOSKIP(fd,RFIFOREST(fd));
 	return 0;
 }
 
@@ -1465,7 +1462,6 @@ int parse_login(int fd)
 		}
 	}
 
-	RFIFOSKIP(fd,RFIFOREST(fd));
 	return 0;
 }