-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace g_strncpy() with str2memcpy()
g_strncpy() is the wrong function for copying strings in struct utmp[x] as it always terminates strings. strncpy() itself would be a good choice, but is marked by many compilers as being unsafe to use. str2memcpy() is taken from util-linux, and is exactly right for this application.
- Loading branch information
1 parent
d14d0ea
commit 18c7124
Showing
1 changed file
with
67 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters