Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace strcpy() for overlapping string operation #2

Merged
merged 1 commit into from Jan 12, 2016

Conversation

meag
Copy link
Collaborator

@meag meag commented Sep 21, 2015

[First commit replaced with Q_strcpy() from ezquake, @fzwoch pointed out memmove() was cleaner].

Userinfo strings were becoming corrupted when removing a key from the string, causing players to disappear from qtv, spectators appearing as players, and/or players appearing but having default/blank names & colours.

Bug must depend on strcpy implementation - couldn't replicate in Windows.
In Linux:

  • Connect qtv to server
  • Connect client to server
  • Check qtv/nowplaying - player should appear as normal
  • Change color/team/name (bug only happens when changing a key that was already in the userinfo and wasn't the last key/value pair in the string)
  • Check qtv/nowplaying - player entry should have one of the symptoms above

meag referenced this pull request in akat1/mvdsv Sep 23, 2015
Including unused functions, strlcpy(3) misuse etc.
@meag meag changed the title Replaces call to strcpy() with Q_strcpy() from ezquake, which is equi… Replace strcpy() for overlapping string operation Sep 24, 2015
strcpy() not safe for overlapping strings, causes corruption in stored
userinfo strings.
meag added a commit that referenced this pull request Jan 12, 2016
Replace strcpy() for overlapping string operation
@meag meag merged commit 2519f08 into QW-Group:master Jan 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant