From: Peng Huang Date: Sun, 11 Apr 2010 22:38:55 +0000 (+0800) Subject: Do not use strnlen any more. X-Git-Tag: 1.3.10~241 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=447efa4d8e3b5b4958780d6d70273a1e754982f7;p=platform%2Fupstream%2Fibus-libpinyin.git Do not use strnlen any more. --- diff --git a/src/PinyinParser.cc b/src/PinyinParser.cc index ee59047..a28cb32 100644 --- a/src/PinyinParser.cc +++ b/src/PinyinParser.cc @@ -59,8 +59,8 @@ is_pinyin (const gchar *p, return NULL; } - len = strnlen (p, 6); - len = MIN (len, end - p); + /* len < 0 */ + len = MIN (6, end - p); strncpy (buf, p, len); for (; len > 0; len --) {