Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

strlcpy finish cleanup

remove strlcpy & strlcat from string.h

document suspicious strlcpy call

convert strlcat.h users to string-extra

Change-Id: I313e75db86385c0e6d1aee75d252093be4935f60

+6 -9
+1 -1
apps/misc.c
··· 1387 1387 char sep[2] = {split_char, '\0'}; 1388 1388 char *e, *p = strtok_r(str, sep, &e); 1389 1389 1390 - /* *p in the condition takes care of trailing splitters */ 1390 + /* strtok takes care of leading & trailing splitters */ 1391 1391 for(i = 0; i < vector_length; i++) 1392 1392 { 1393 1393 vector[i] = p;
+1
firmware/common/file_internal.c
··· 227 227 return; 228 228 229 229 char shortname[13]; 230 + /* this only gets called in the case of DOS (8.3) filenames */ 230 231 size_t len = strlcpy(shortname, d_name, sizeof (shortname)); 231 232 /* This MUST be the default codepage thus not something that could be 232 233 loaded on call */
+1 -1
firmware/common/strlcpy.c
··· 34 34 if (d) 35 35 return (d - dst - 1); /* count does not include NUL */ 36 36 37 - /* Not enough room in dst, add NUL and traverse rest of src */ 37 + /* Not enough room in dst, traverse rest of src */ 38 38 return(siz + strlen(src+siz)); /* count does not include NUL */ 39 39 }
+1 -2
firmware/common/zip.c
··· 20 20 ****************************************************************************/ 21 21 22 22 #include "zip.h" 23 - #include <string.h> 24 - #include "strlcpy.h" 23 + #include "string-extra.h" 25 24 #include "file.h" 26 25 #include "dir.h" 27 26 #include "system.h"
+1 -1
firmware/drivers/fat.c
··· 22 22 #include "config.h" 23 23 #include "system.h" 24 24 #include "sys/types.h" 25 - #include <string.h> 25 + #include "string-extra.h" 26 26 #include <ctype.h> 27 27 #include <stdlib.h> 28 28 #include <stdio.h>
-3
firmware/libc/include/string.h
··· 40 40 char *_EXFUN(strstr,(const char *, const char *)); 41 41 char *_EXFUN(strcasestr,(const char *, const char *)); 42 42 43 - size_t strlcpy(char *dst, const char *src, size_t siz); 44 - size_t strlcat(char *dst, const char *src, size_t siz); 45 - 46 43 #ifndef _REENT_ONLY 47 44 char *_EXFUN(strtok,(char *, const char *)); 48 45 #endif
+1 -1
lib/rbcodec/metadata/replaygain.c
··· 26 26 #include <stdlib.h> 27 27 #include <inttypes.h> 28 28 #include "platform.h" 29 - #include "strlcpy.h" 29 + #include "string-extra.h" 30 30 #include "strcasecmp.h" 31 31 #include "metadata.h" 32 32 #include "debug.h"