summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-21 15:44:39 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-21 15:44:39 +0000
commitaed45db088c1ab5a283e732fac743cf7eef945db (patch)
treefc96b8db7983052940690829fd951a7891151fc0 /src/map/script.c
parent9a850a659b05bbd8be0c51027bda20493d875431 (diff)
downloadhercules-aed45db088c1ab5a283e732fac743cf7eef945db.tar.gz
hercules-aed45db088c1ab5a283e732fac743cf7eef945db.tar.bz2
hercules-aed45db088c1ab5a283e732fac743cf7eef945db.tar.xz
hercules-aed45db088c1ab5a283e732fac743cf7eef945db.zip
- Changed a certain snprintf to strncpy, you really really really REALLY shouldn't use snprintf with a format argument that may contain unpredictable string sequences!
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9550 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c
index e8aea1fd7..a493322cc 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -1025,7 +1025,7 @@ const char* parse_syntax(const char* p) {
if(*p != ':')
disp_error_message("parse_syntax: expect ':'",p);
memcpy(label,"if(",3);
- snprintf(label+3,len,p2);
+ strncpy(label+3,p2,len);
sprintf(label+3+len," != $@__SW%x_VAL) goto __SW%x_%x;",
syntax.curly[pos].index,syntax.curly[pos].index,syntax.curly[pos].count+1);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;