xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libxl: off by one fix for new network-attach args parsing
@ 2011-06-12 18:54 Marek Marczykowski
  2011-06-17 17:58 ` Ian Jackson
  0 siblings, 1 reply; 6+ messages in thread
From: Marek Marczykowski @ 2011-06-12 18:54 UTC (permalink / raw)
  To: xen-devel; +Cc: marmarek

# HG changeset patch
# User Marek Marczykowski <marmarek@mimuw.edu.pl>
# Date 1307904815 -7200
# Node ID 764214d25cd9825925aeb846a6bdec56c9a5259a
# Parent  262a414e7e37541ff3c1346b316487606e9e736f
libxl: off by one fix for new network-attach args parsing

sizeof(const string) returns string length WITH \0 terminator.

Signed-off-by: Marek Marczykowski <marmarek@mimuw.edu.pl>

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -1238,7 +1238,7 @@ static int match_option_size(const char 
     return !rc;
 }
 #define match_option(_prefix, _arg, _oparg) \
-    match_option_size((_prefix "="), sizeof((_prefix)) + 1, (_arg), &(_oparg))
+    match_option_size((_prefix "="), sizeof((_prefix)), (_arg), &(_oparg))
 
 static void replace_string(char **str, const char *val)
 {

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-06-27 16:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-12 18:54 [PATCH] libxl: off by one fix for new network-attach args parsing Marek Marczykowski
2011-06-17 17:58 ` Ian Jackson
2011-06-21 16:49   ` [PATCH RESENT] xl: Use macros for param parsing in network-attach, to prevent use explicit sizeof("param") Marek Marczykowski
2011-06-27 14:26     ` Ian Jackson
2011-06-27 14:37       ` Marek Marczykowski
2011-06-27 16:21         ` Ian Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).