diff options
author | William Wilgus <wilgus.william@gmail.com> | 2022-11-15 00:29:35 -0500 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2022-11-15 01:24:26 -0500 |
commit | 687767bd8f4f471c2c6e9509125a78d7cb5f0f62 (patch) | |
tree | e76f7412eafeeecd73445149c60651b31d56d8bf /apps/onplay.c | |
parent | aea324b74661e77341e518de981fc989ffd1e010 (diff) | |
download | rockbox-687767bd8f4f471c2c6e9509125a78d7cb5f0f62.tar.gz rockbox-687767bd8f4f471c2c6e9509125a78d7cb5f0f62.zip |
convert a few more strlcpy to strmemccpy calls Fix Red and Yellow
albumart is imported to plugins just use a macro substitution
for now
Change-Id: I7c2e10d7559c087f0b3d0e6b844027d3b323da55
Diffstat (limited to 'apps/onplay.c')
-rw-r--r-- | apps/onplay.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/onplay.c b/apps/onplay.c index 8d53e26fc5..8507699bd3 100644 --- a/apps/onplay.c +++ b/apps/onplay.c | |||
@@ -126,8 +126,8 @@ static bool clipboard_clip(struct clipboard *clip, const char *path, | |||
126 | unsigned int attr, unsigned int flags) | 126 | unsigned int attr, unsigned int flags) |
127 | { | 127 | { |
128 | /* if it fits it clips */ | 128 | /* if it fits it clips */ |
129 | if (strlcpy(clip->path, path, sizeof (clip->path)) | 129 | if (strmemccpy(clip->path, path, sizeof (clip->path)) != NULL) |
130 | < sizeof (clip->path)) { | 130 | { |
131 | clip->attr = attr; | 131 | clip->attr = attr; |
132 | clip->flags = flags; | 132 | clip->flags = flags; |
133 | return true; | 133 | return true; |
@@ -1048,7 +1048,7 @@ static int rename_file(void) | |||
1048 | size_t pathlen = oldbase - selection; | 1048 | size_t pathlen = oldbase - selection; |
1049 | char *newbase = newname + pathlen; | 1049 | char *newbase = newname + pathlen; |
1050 | 1050 | ||
1051 | if (strlcpy(newname, selection, sizeof (newname)) >= sizeof (newname)) { | 1051 | if (strmemccpy(newname, selection, sizeof (newname)) == NULL) { |
1052 | /* Too long */ | 1052 | /* Too long */ |
1053 | } else if (kbd_input(newbase, sizeof (newname) - pathlen, NULL) < 0) { | 1053 | } else if (kbd_input(newbase, sizeof (newname) - pathlen, NULL) < 0) { |
1054 | rc = OPRC_CANCELLED; | 1054 | rc = OPRC_CANCELLED; |