strxcpyx: do not access dest as an array
dest is a pointer to a string, not an array. Accessing the "first element" just happens to work, but let's be more careful.
This commit is contained in:
@@ -41,7 +41,7 @@ size_t strnpcpy_full(char **dest, size_t size, const char *src, size_t len, bool
|
||||
if (ret_truncated)
|
||||
*ret_truncated = truncated;
|
||||
|
||||
*dest[0] = '\0';
|
||||
(*dest)[0] = '\0';
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user