73912c9d4a
From new maintainer Gregory Steuck <greg-openbsd-pwm@nest.cx>.
16 lines
594 B
Plaintext
16 lines
594 B
Plaintext
$OpenBSD: patch-readconfig_c,v 1.1 2003/06/05 23:01:51 naddy Exp $
|
|
--- readconfig.c.orig Sun Jun 1 14:01:37 2003
|
|
+++ readconfig.c Sun Jun 1 15:15:23 2003
|
|
@@ -1025,8 +1025,9 @@ bool read_config(const char* cfgfile)
|
|
if(cfgfile==NULL){
|
|
cfgfile=getenv("HOME");
|
|
if(cfgfile!=NULL){
|
|
- tmp=ALLOC_N(char, strlen(cfgfile)+strlen(CF_USER_CFGFILE)+2);
|
|
- sprintf(tmp, "%s/%s", cfgfile, CF_USER_CFGFILE);
|
|
+ int tmp_len = strlen(cfgfile)+strlen(CF_USER_CFGFILE)+2;
|
|
+ tmp=ALLOC_N(char, tmp_len);
|
|
+ snprintf(tmp, tmp_len, "%s/%s", cfgfile, CF_USER_CFGFILE);
|
|
cfgfile=tmp;
|
|
}
|
|
|