projects
/
platform
/
upstream
/
ibus-libpinyin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29c97ae
)
Do not use strnlen any more.
author
Peng Huang
<shawn.p.huang@gmail.com>
Sun, 11 Apr 2010 22:38:55 +0000
(06:38 +0800)
committer
Peng Huang
<shawn.p.huang@gmail.com>
Sun, 11 Apr 2010 22:38:55 +0000
(06:38 +0800)
src/PinyinParser.cc
patch
|
blob
|
history
diff --git
a/src/PinyinParser.cc
b/src/PinyinParser.cc
index
ee59047
..
a28cb32
100644
(file)
--- 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 --) {