From e2479cc43febe9cf26093fa2103a199d2d245711 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 22 Dec 2017 01:03:17 +0000 Subject: encoding.c: rb_enc_find_index2 * string.c (str_undump): use rb_enc_find_index2 to find encoding by unterminated string. check the format before encoding name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- encindex.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'encindex.h') diff --git a/encindex.h b/encindex.h index dcb1646f3a..658b60a9fd 100644 --- a/encindex.h +++ b/encindex.h @@ -57,6 +57,8 @@ enum ruby_preserved_encindex { #define rb_utf8_encindex() RUBY_ENCINDEX_UTF_8 #define rb_usascii_encindex() RUBY_ENCINDEX_US_ASCII +int rb_enc_find_index2(const char *name, long len); + #if defined(__cplusplus) #if 0 { /* satisfy cc-mode */ -- cgit v1.2.1