diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2014-09-22 15:23:50 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2014-09-22 15:23:50 +0200 |
commit | 68d8631ab66380a553cb14c10ee3908561b5a7db (patch) | |
tree | 17eb4148a22717d9c7ff774e3f7f2953102e4670 | |
parent | 62f87a4a62441b1da7c4f653065692f988b85ed8 (diff) | |
download | uhttpd-68d8631ab66380a553cb14c10ee3908561b5a7db.tar.gz |
Use safe uh_realpath()
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
-rw-r--r-- | uhttpd.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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)); |