]> git.pld-linux.org Git - packages/compat-ncurses5.git/blob - ncurses-setuid.patch
- updated.
[packages/compat-ncurses5.git] / ncurses-setuid.patch
1 --- ncurses-5.0/ncurses/tinfo/read_termcap.c.orig       Tue Jan 11 18:15:07 2000
2 +++ ncurses-5.0/ncurses/tinfo/read_termcap.c    Tue Jan 11 18:17:27 2000
3 @@ -1020,7 +1020,10 @@
4         for (i = 0; i < filecount; i++) {
5  
6             T(("Looking for %s in %s", tn, termpaths[i]));
7 -           if ((fp = fopen(termpaths[i], "r")) != (FILE *) 0) {
8 +           if ((_nc_access(termpaths[i], R_OK) < 0)
9 +               || (fp = fopen(termpaths[i], "r")) == (FILE *)0) {
10 +               T(("Could not open %s (error %d)", termpaths[i], errno));
11 +           } else {
12                 _nc_set_source(termpaths[i]);
13  
14                 /*
This page took 0.050095 seconds and 4 git commands to generate.