[hamradio-commits] [dump1090] 331/389: B"H net_io.c: http server: content should be dynamically allocated

Matthew Ernisse mernisse-guest at moszumanska.debian.org
Wed Nov 5 00:20:11 UTC 2014


This is an automated email from the git hooks/post-receive script.

mernisse-guest pushed a commit to branch master
in repository dump1090.

commit 32fc5fddd0900b446600dbf05e88d44187d4b5f5
Author: hhm <heehooman+vcs-ci at gmail.com>
Date:   Wed Sep 17 07:32:34 2014 -0400

    B"H net_io.c: http server: content should be dynamically allocated
---
 net_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net_io.c b/net_io.c
index 10e09d0..4a19429 100644
--- a/net_io.c
+++ b/net_io.c
@@ -749,7 +749,7 @@ int handleHTTPRequest(struct client *c, char *p) {
         hrp = realpath(HTMLPATH, NULL);
         hrp = (hrp ? hrp : HTMLPATH);
         clen = -1;
-        content = "Server error";
+        content = calloc(1, 1);
         if (rp && (!strncmp(hrp, rp, strlen(hrp)))) {
             if (stat(getFile, &sbuf) != -1 && (fd = open(getFile, O_RDONLY)) != -1) {
                 content = (char *) malloc(sbuf.st_size);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/dump1090.git



More information about the pkg-hamradio-commits mailing list