aboutsummaryrefslogtreecommitdiff
path: root/secchan
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2009-06-10 14:16:40 -0700
committerBen Pfaff <blp@nicira.com>2009-06-10 15:31:20 -0700
commite50097d233cb52551702165324514cb6018a7627 (patch)
treeb089af77a85d083f577654a595228a4f8d733040 /secchan
parentd798447957d98428fdddae744f2e58d2802286d8 (diff)
Fix glibc 2.7 strtok_r() bug in a more permanent fashion.
The glibc 2.7 headers contain a bug that causes strtok_r() to segfault in some circumstances. Until now, we have been working around this problem at each invocation, but this depends on the programmer to remember to do so each time. This commit instead adds a shim that adds a work-around to the string.h header itself, so that it is much more difficult to miss the workaround.
Diffstat (limited to 'secchan')
-rw-r--r--secchan/netflow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/secchan/netflow.c b/secchan/netflow.c
index 99f3eea4..5d90eea3 100644
--- a/secchan/netflow.c
+++ b/secchan/netflow.c
@@ -118,8 +118,8 @@ open_collector(char *dst)
* can cause segfaults here:
* http://sources.redhat.com/bugzilla/show_bug.cgi?id=5614.
* Using "::" instead of the obvious ":" works around it. */
- host_name = strtok_r(dst, "::", &save_ptr);
- port_string = strtok_r(NULL, "::", &save_ptr);
+ host_name = strtok_r(dst, ":", &save_ptr);
+ port_string = strtok_r(NULL, ":", &save_ptr);
if (!host_name) {
ovs_error(0, "%s: bad peer name format", dst);
return -EAFNOSUPPORT;