diff options
Diffstat (limited to 'app-misc/slmon/files/slmon-0.5.13-invalid-free.patch')
-rw-r--r-- | app-misc/slmon/files/slmon-0.5.13-invalid-free.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app-misc/slmon/files/slmon-0.5.13-invalid-free.patch b/app-misc/slmon/files/slmon-0.5.13-invalid-free.patch new file mode 100644 index 000000000000..d7b0e24e07d9 --- /dev/null +++ b/app-misc/slmon/files/slmon-0.5.13-invalid-free.patch @@ -0,0 +1,18 @@ +http://bugs.gentoo.org/151293 + +--- rc.c ++++ rc.c +@@ -177,9 +177,10 @@ + char *home, dotrc[1024] = { 0 }; + + home = getenv("HOME"); +- strcpy(dotrc, home); +- strcat(dotrc, "/.slmonrc"); +- free(home); ++ if ( home != NULL ) { ++ strcpy(dotrc, home); ++ strcat(dotrc, "/.slmonrc"); ++ } + + if ((f = fopen("/etc/slmonrc", "r")) != NULL) { + slmon_conf_parse(f); |