summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-09-26 20:54:46 -0500
committerSlávek Banko <slavek.banko@axis.cz>2012-10-29 04:20:12 +0100
commit4a132b511d04eb056c611a865c84b0daa6a147be (patch)
treed92555758eac1a0c4b9e8f931b210f50fc65d490
parent2762188456fa4a58d7927c5a18a0ded251054874 (diff)
downloadamarok-4a132b511d04eb056c611a865c84b0daa6a147be.tar.gz
amarok-4a132b511d04eb056c611a865c84b0daa6a147be.zip
Fix format not a string literal security error in rb_raise
(cherry picked from commit 44273426d153c4718502c89a44d9aa41628bd5ab)
-rw-r--r--amarok/src/mediadevice/daap/mongrel/http11/http11.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/amarok/src/mediadevice/daap/mongrel/http11/http11.c b/amarok/src/mediadevice/daap/mongrel/http11/http11.c
index 863eb9f2..fa1b36ae 100644
--- a/amarok/src/mediadevice/daap/mongrel/http11/http11.c
+++ b/amarok/src/mediadevice/daap/mongrel/http11/http11.c
@@ -46,7 +46,7 @@ static VALUE global_port_80;
#define DEF_MAX_LENGTH(N,length) const size_t MAX_##N##_LENGTH = length; const char *MAX_##N##_LENGTH_ERR = "HTTP element " # N " is longer than the " # length " allowed length."
/** Validates the max length of given input and throws an HttpParserError exception if over. */
-#define VALIDATE_MAX_LENGTH(len, N) if(len > MAX_##N##_LENGTH) { rb_raise(eHttpParserError, MAX_##N##_LENGTH_ERR); }
+#define VALIDATE_MAX_LENGTH(len, N) if(len > MAX_##N##_LENGTH) { rb_raise(eHttpParserError, "%s", MAX_##N##_LENGTH_ERR); }
/** Defines global strings in the init method. */
#define DEF_GLOBAL(N, val) global_##N = rb_obj_freeze(rb_str_new2(val)); rb_global_variable(&global_##N)