diff options
author | Nils Wallménius <nils@rockbox.org> | 2009-07-14 13:57:45 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2009-07-14 13:57:45 +0000 |
commit | 3d4701a6e41616cf581a297bab1451cf2db70249 (patch) | |
tree | f845837c96ffbed7d59ddf8308f3b3e7c40cb8c9 /apps/plugins/dict.c | |
parent | c2900a1bacd5d98b57a0d15ea2add1bc08764057 (diff) | |
download | rockbox-3d4701a6e41616cf581a297bab1451cf2db70249.tar.gz rockbox-3d4701a6e41616cf581a297bab1451cf2db70249.zip |
FS#10080
* Move strncpy() from core to the pluginlib
* Introduce strlcpy() and use that instead in most places (use memcpy in a few) in core and some plugins
* Drop strncpy() from the codec api as no codec used it
* Bump codec and plugin api versions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21863 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/dict.c')
-rw-r--r-- | apps/plugins/dict.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/plugins/dict.c b/apps/plugins/dict.c index 0c1ddf33a9..fcc55faef1 100644 --- a/apps/plugins/dict.c +++ b/apps/plugins/dict.c | |||
@@ -283,8 +283,7 @@ enum plugin_status plugin_start(const void* parameter) | |||
283 | while (1) | 283 | while (1) |
284 | { | 284 | { |
285 | /* copy one lcd line */ | 285 | /* copy one lcd line */ |
286 | rb->strncpy(output, ptr, display_columns); | 286 | rb->strlcpy(output, ptr, display_columns + 1); |
287 | output[display_columns] = '\0'; | ||
288 | 287 | ||
289 | /* typecast to kill a warning... */ | 288 | /* typecast to kill a warning... */ |
290 | if((int)rb->strlen(ptr) < display_columns) | 289 | if((int)rb->strlen(ptr) < display_columns) |