Missing format string
Do not use a variable as a format string. Also we usually don't expect non-ascii data in C string literals.
This commit is contained in:
parent
7bf3d9343f
commit
2ab247d217
@ -275,7 +275,7 @@ static VALUE encoding_spec_rb_enc_raise(VALUE self, VALUE encoding, VALUE except
|
|||||||
rb_encoding *e = rb_to_encoding(encoding);
|
rb_encoding *e = rb_to_encoding(encoding);
|
||||||
const char *f = RSTRING_PTR(format);
|
const char *f = RSTRING_PTR(format);
|
||||||
|
|
||||||
rb_enc_raise(e, exception_class, f);
|
rb_enc_raise(e, exception_class, "%s", f);
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE encoding_spec_rb_uv_to_utf8(VALUE self, VALUE buf, VALUE num) {
|
static VALUE encoding_spec_rb_uv_to_utf8(VALUE self, VALUE buf, VALUE num) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user