]> git.pld-linux.org Git - packages/autorespond.git/blob - autorespond.stupidity.patch
- tabs in preamble
[packages/autorespond.git] / autorespond.stupidity.patch
1 diff -Nur autorespond-2.0.2/Makefile autorespond-2.0.2.mod/Makefile
2 --- autorespond-2.0.2/Makefile  2001-11-27 20:25:04.000000000 +0100
3 +++ autorespond-2.0.2.mod/Makefile      2004-08-06 00:21:36.558091618 +0200
4 @@ -14,8 +14,10 @@
5  INSTALL_UID = root
6  INSTALL_GID = root
7  
8 -all:
9 -       $(CC) $(DEFS) -o autorespond autorespond.c
10 +all: autorespond
11 +
12 +autorespond: autorespond.c
13 +       $(CC) $(DEFS) $^ -o $@
14  
15  install: all
16         @echo "Installing..."
17 diff -Nur autorespond-2.0.2/autorespond.c autorespond-2.0.2.mod/autorespond.c
18 --- autorespond-2.0.2/autorespond.c     2001-11-30 20:12:23.000000000 +0100
19 +++ autorespond-2.0.2.mod/autorespond.c 2004-08-06 00:20:43.172754567 +0200
20 @@ -117,6 +117,7 @@
21                 /*exit...no memory*/
22                 _exit(111);
23         }
24 +       memset(ptr,0,size);
25  
26         return ptr;
27  }
28 @@ -571,8 +572,14 @@
29                 _exit(111);
30         }
31  
32 -       strcpy(TheUser, getenv("EXT") );
33 -       strcpy(TheDomain, getenv("HOST") );
34 +       memset(TheUser, ' ', MAX_BUFF);
35 +       memset(TheDomain, ' ', MAX_BUFF);
36 +
37 +       if(getenv("EXT") != NULL) 
38 +               strncpy(TheUser, getenv("EXT") , MAX_BUFF -1);
39 +
40 +       if(getenv("HOST") != NULL) 
41 +               strncpy(TheDomain, getenv("HOST") , MAX_BUFF -1);
42   
43         setvbuf(stderr, NULL, _IONBF, 0);
44  
This page took 0.055916 seconds and 3 git commands to generate.