Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56204 - trunk/tools/jam/src
From: ghost_at_[hidden]
Date: 2009-09-15 02:03:23


Author: vladimir_prus
Date: 2009-09-15 02:03:23 EDT (Tue, 15 Sep 2009)
New Revision: 56204
URL: http://svn.boost.org/trac/boost/changeset/56204

Log:
Don't mutate input to SPLIT_BY_CHARACTERS.

Text files modified:
   trunk/tools/jam/src/builtins.c | 4 +++-
   1 files changed, 3 insertions(+), 1 deletions(-)

Modified: trunk/tools/jam/src/builtins.c
==============================================================================
--- trunk/tools/jam/src/builtins.c (original)
+++ trunk/tools/jam/src/builtins.c 2009-09-15 02:03:23 EDT (Tue, 15 Sep 2009)
@@ -858,7 +858,7 @@
 
     LIST * result = 0;
 
- char* s = l1->string;
+ char* s = strdup (l1->string);
     char* delimiters = l2->string;
     char* t;
 
@@ -869,6 +869,8 @@
         t = strtok (NULL, delimiters);
     }
 
+ free (s);
+
     return result;
 }
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk