mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-30 11:40:32 +00:00
Fix an edge case with strlcat().
This commit is contained in:
parent
0f0a4d0a5e
commit
079549cbd2
5
strl.c
5
strl.c
@ -41,7 +41,12 @@ size_t strlcat(char *dest, const char *source, size_t size)
|
|||||||
{
|
{
|
||||||
size_t len = strlen(dest);
|
size_t len = strlen(dest);
|
||||||
dest += len;
|
dest += len;
|
||||||
|
|
||||||
|
if (len > size)
|
||||||
|
size = 0;
|
||||||
|
else
|
||||||
size -= len;
|
size -= len;
|
||||||
|
|
||||||
return len + strlcpy(dest, source, size);
|
return len + strlcpy(dest, source, size);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user