Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/httpd move a variable into the scope of its use, whe...
details: https://anonhg.NetBSD.org/src/rev/86561f14f707
branches: trunk
changeset: 793204:86561f14f707
user: mrg <mrg%NetBSD.org@localhost>
date: Thu Jan 30 02:51:41 2014 +0000
description:
move a variable into the scope of its use, where the assignment
has already validated the pointers used. fixes a bug reported
in private email from dogcow@.
diffstat:
libexec/httpd/bozohttpd.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (25 lines):
diff -r cc6cbbea5fe1 -r 86561f14f707 libexec/httpd/bozohttpd.c
--- a/libexec/httpd/bozohttpd.c Thu Jan 30 01:06:11 2014 +0000
+++ b/libexec/httpd/bozohttpd.c Thu Jan 30 02:51:41 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bozohttpd.c,v 1.45 2014/01/02 08:21:38 mrg Exp $ */
+/* $NetBSD: bozohttpd.c,v 1.46 2014/01/30 02:51:41 mrg Exp $ */
/* $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $ */
@@ -1853,7 +1853,6 @@
const char *reason = http_errors_long(code);
const char *proto = (request && request->hr_proto) ?
request->hr_proto : httpd->consts.http_11;
- const char *hostname = BOZOHOST(httpd, request);
int size;
debug((httpd, DEBUG_FAT, "bozo_http_error %d: %s", code, msg));
@@ -1873,6 +1872,7 @@
if (request && request->hr_file) {
char *file = NULL;
+ const char *hostname = BOZOHOST(httpd, request);
/* bozo_escape_html() failure here is just too bad. */
file = bozo_escape_html(NULL, request->hr_file);
Home |
Main Index |
Thread Index |
Old Index