diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/clif.c | 2 | ||||
-rw-r--r-- | src/map/vending.c | 1 |
2 files changed, 2 insertions, 1 deletions
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); |