mirror of
https://github.com/gophernicus/gophernicus.git
synced 2024-10-27 05:20:18 -04:00
Prevent possible leak of executable gophermap contents.
This commit is contained in:
parent
f56ae187ef
commit
0b4d22e636
6
menu.c
6
menu.c
@ -311,13 +311,15 @@ int gophermap(state *st, char *mapfile, int depth)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Try to execute or open the mapfile */
|
/* Try to execute or open the mapfile */
|
||||||
#ifdef HAVE_POPEN
|
|
||||||
if (exe) {
|
if (exe) {
|
||||||
|
#ifdef HAVE_POPEN
|
||||||
setenv_cgi(st, mapfile);
|
setenv_cgi(st, mapfile);
|
||||||
if ((fp = popen(command, "r")) == NULL) return OK;
|
if ((fp = popen(command, "r")) == NULL) return OK;
|
||||||
|
#else
|
||||||
|
return OK;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
if ((fp = fopen(mapfile, "r")) == NULL) return OK;
|
if ((fp = fopen(mapfile, "r")) == NULL) return OK;
|
||||||
|
|
||||||
/* Read lines one by one */
|
/* Read lines one by one */
|
||||||
|
Loading…
Reference in New Issue
Block a user