projects
/
rogue-pphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9653f99
)
Prevent crash due to buffer overflow detection (and on some platforms probably actual...
author
Joe Wreschnig
<joe.wreschnig@gmail.com>
Thu, 4 Apr 2013 10:11:27 +0000
(12:11 +0200)
committer
Joe Wreschnig
<joe.wreschnig@gmail.com>
Thu, 4 Apr 2013 10:11:27 +0000
(12:11 +0200)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index 32fdbd036bccaf45be36d79aca39010be921daeb..59240e017048a1901b5e8bbb218ee1b136fad596 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-58,7
+58,7
@@
char **envp;
/*
\r
* get home and options from environment
\r
*/
\r
- strncpy(home, md_gethomedir(),
PATH_MAX
);
\r
+ strncpy(home, md_gethomedir(),
sizeof(home) - 1
);
\r
\r
strcpy(file_name, home);
\r
strcat(file_name, "rogue36.sav");
\r