Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
network: Fix read-only strings being overwritten
POSIX sucks and here we have another example. strchr() / strrchr() take a pointer to a const string, and return a pointer to the character found as a non-const "char *". The compiler and static analyzers would then detect the follow-up code, which would overwrite the static string through that non-const pointer, as perfectly valid C. Address this issue by copying the const string into a temporary buffer. Signed-off-by: Paul Cercueil <[email protected]>
- Loading branch information