Explorar o código

update

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@798 54d463be-8e91-2dee-dedb-b68131a5f0ec
amber %!s(int64=20) %!d(string=hai) anos
pai
achega
f9a63a7efb
Modificáronse 3 ficheiros con 3 adicións e 2 borrados
  1. 1 1
      Changelog.txt
  2. 1 1
      src/map/clif.c
  3. 1 0
      src/map/vending.c

+ 1 - 1
Changelog.txt

@@ -1,6 +1,6 @@
 Date	Added
 12/26
-	* Fixed some array bounds errors (SVN 797) [MouseJstr]
+	* Fixed some array bounds errors (SVN 798) [MouseJstr]
 	* @mapexit (and do_final) now persist all data to the
 	  char server before exiting to eliminate storage/inventory
 	  inconsistancies.. [MouseJstr]  (SVN 793)

+ 1 - 1
src/map/clif.c

@@ -1820,7 +1820,7 @@ int clif_cutin(struct map_session_data *sd, char *image, int type) {
 
 	fd=sd->fd;
 	WFIFOW(fd,0)=0x1b3;
-	memcpy(WFIFOP(fd,2),image,64);
+	strncpy(WFIFOP(fd,2),image,64);
 	WFIFOB(fd,66)=type;
 	WFIFOSET(fd,packet_len_table[0x1b3]);
 

+ 1 - 0
src/map/vending.c

@@ -154,6 +154,7 @@ void vending_openvending(struct map_session_data *sd,int len,char *message,int f
 		}
 		sd->vender_id = sd->bl.id;
 		sd->vend_num = i;
+                Assert (sd->vend_num < (sizeof (sd->vending) / sizeof(sd->vending[0])));
 		strcpy(sd->message,message);
 		if (clif_openvending(sd,sd->vender_id,sd->vending) > 0)
 			clif_showvendingboard(&sd->bl,message,0);