summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-26 18:00:45 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-26 23:15:42 +0300
commit012e290896640e367a39149726e3af303709cfc5 (patch)
tree074176a8ea69e575ee5acc13a3b5afa9f0d966f9
parentd94f1baf332fa5c6574af61ae7168bfbae985969 (diff)
downloadhercules-012e290896640e367a39149726e3af303709cfc5.tar.gz
hercules-012e290896640e367a39149726e3af303709cfc5.tar.bz2
hercules-012e290896640e367a39149726e3af303709cfc5.tar.xz
hercules-012e290896640e367a39149726e3af303709cfc5.zip
Fix buffer overflow in @set command. Closes #667
-rw-r--r--src/map/atcommand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index ed0e282bc..105f3304c 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -8431,7 +8431,7 @@ ACMD(set) {
bool is_str = false;
size_t len;
- if( !message || !*message || (toset = sscanf(message, "%31s %128[^\n]s", reg, val)) < 1 ) {
+ if( !message || !*message || (toset = sscanf(message, "%31s %127[^\n]s", reg, val)) < 1 ) {
clif->message(fd, msg_fd(fd,1367)); // Usage: @set <variable name> <value>
clif->message(fd, msg_fd(fd,1368)); // Usage: ex. "@set PoringCharVar 50"
clif->message(fd, msg_fd(fd,1369)); // Usage: ex. "@set PoringCharVarSTR$ Super Duper String"