summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2014-09-22 15:23:50 +0200
committerJo-Philipp Wich <jow@openwrt.org>2014-09-22 15:23:50 +0200
commit68d8631ab66380a553cb14c10ee3908561b5a7db (patch)
tree17eb4148a22717d9c7ff774e3f7f2953102e4670
parent62f87a4a62441b1da7c4f653065692f988b85ed8 (diff)
downloaduhttpd-68d8631ab66380a553cb14c10ee3908561b5a7db.tar.gz
Use safe uh_realpath()
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
-rw-r--r--uhttpd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/uhttpd.c b/uhttpd.c
index f9ac3db..0d6eb9a 100644
--- a/uhttpd.c
+++ b/uhttpd.c
@@ -1035,7 +1035,7 @@ int main (int argc, char **argv)
/* docroot */
case 'h':
- if (! realpath(optarg, conf.docroot))
+ if (! uh_realpath(optarg, conf.docroot))
{
fprintf(stderr, "Error: Invalid directory %s: %s\n",
optarg, strerror(errno));
@@ -1266,7 +1266,7 @@ int main (int argc, char **argv)
}
/* default docroot */
- if (!conf.docroot[0] && !realpath(".", conf.docroot))
+ if (!conf.docroot[0] && !uh_realpath(".", conf.docroot))
{
fprintf(stderr, "Error: Can not determine default document root: %s\n",
strerror(errno));