Ottomata has submitted this change and it was merged.

Change subject: allow config lines up to 4K length
......................................................................


allow config lines up to 4K length

We've run into issues with "format" in excess of the fixed buffer
size, which was 512 before this patch.  Note the updates to
"errstr" size as well in two places: I think this can sometimes
hold a config line, which is why they were sized the same before
and raised the same in this patch.

Change-Id: I4432d5305a4c7b156124db8c662e3537a98e67f5
---
M config.c
M varnishkafka.c
2 files changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Ottomata: Verified; Looks good to me, approved



diff --git a/config.c b/config.c
index d06edd5..9380dbe 100644
--- a/config.c
+++ b/config.c
@@ -263,8 +263,8 @@
  */
 int conf_file_read (const char *path) {
        FILE *fp;
-       char buf[512];
-       char errstr[512];
+       char buf[4096];
+       char errstr[4096];
        int line = 0;
 
        if (!(fp = fopen(path, "r"))) {
diff --git a/varnishkafka.c b/varnishkafka.c
index 532bcb2..efb8f3e 100644
--- a/varnishkafka.c
+++ b/varnishkafka.c
@@ -1956,7 +1956,7 @@
 
 
 int main (int argc, char **argv) {
-       char errstr[512];
+       char errstr[4096];
        char hostname[1024];
        struct hostent *lh;
        char c;

-- 
To view, visit https://gerrit.wikimedia.org/r/253476
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4432d5305a4c7b156124db8c662e3537a98e67f5
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/varnish/varnishkafka
Gerrit-Branch: master
Gerrit-Owner: BBlack <[email protected]>
Gerrit-Reviewer: Ottomata <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to