From dc1c7d89daaea595ce89f5197317c61ab292c7de Mon Sep 17 00:00:00 2001 From: amber Date: Sun, 26 Dec 2004 22:22:17 +0000 Subject: update git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@798 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog.txt | 2 +- src/map/clif.c | 2 +- src/map/vending.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index a90221c0f..fe84df624 100644 --- a/Changelog.txt +++ b/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) diff --git a/src/map/clif.c b/src/map/clif.c index ca7e60c6c..acfb5c0ee 100644 --- a/src/map/clif.c +++ b/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]); diff --git a/src/map/vending.c b/src/map/vending.c index a7aa708e5..54af338c1 100644 --- a/src/map/vending.c +++ b/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); -- cgit v1.2.3-60-g2f50