Skip to contentSkip to conversation

Increase size of sxpr parser input buffer

PATCH In review Jody Belka 2 participants 2 messages May 7, 2005 – May 8, 2005

lore
Share & tools
lore

Jody Belka

author
#0 lore raw

PATCH 1/1 Increase size of sxpr parser input buffer

Increase the size of the sxpr parser input buffer from 1024 characters, which isn't long enough to hold larger domain configurations (xfrd transmits the entire domain config sxpr as a single atom inside of another sxpr).

Signed-off-by Jody Belka <knew (dash) xen (at) pimb (dot) org>
tools/libxutil/sxpr_parser.h +1 -1
diff -durN xen.orig/tools/libxutil/sxpr_parser.h xen.new/tools/libxutil/sxpr_parser.h
@@ -28,7 +28,7 @@
 /** Size of a parser input buffer.
  * Tokens read must fit into this size (including trailing null).
  */
-#define PARSER_BUF_SIZE 1024
+#define PARSER_BUF_SIZE 4096
 
 struct Parser;
 typedef int ParserStateFn(struct Parser *, char c);
#1 lore raw
Quoted 4 lines · Jody Belka

plain text document attachment (sxpr_parser.patch)
Increase the size of the sxpr parser input buffer from 1024 characters, which isn't long enough to hold larger domain configurations (xfrd transmits the entire domain config sxpr as a single atom inside of another sxpr).

This seems like the wrong fix. The buffer size wasn't the problem. The problem was the bad design assumption in xfrd.

It's almost always the wrong thing to insert a patch whose effect is to mask a known problem.

shap