]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Put quotes around the argument to /usr/bin/dsymutil, so it doesn't
authorJulian Seward <jseward@acm.org>
Wed, 21 Jul 2010 16:00:08 +0000 (16:00 +0000)
committerJulian Seward <jseward@acm.org>
Wed, 21 Jul 2010 16:00:08 +0000 (16:00 +0000)
screw up on filenames with spaces.  Fixes (part of) #205093.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11219

coregrind/m_debuginfo/readmacho.c

index b6b746e4180f47681401ebd9adbe0733ce8531fb..68ba359f2121a2befb50ca6102e108e1cab22170 100644 (file)
@@ -948,10 +948,12 @@ Bool ML_(read_macho_debug_info)( struct _DebugInfo* di )
      HChar* cmd = ML_(dinfo_zalloc)( "di.readmacho.tmp1", 
                                      VG_(strlen)(dsymutil)
                                      + VG_(strlen)(di->filename)
-                                     + 30 /* misc */ );
+                                     + 32 /* misc */ );
      VG_(strcpy)(cmd, dsymutil);
      if (0) VG_(strcat)(cmd, "--verbose ");
+     VG_(strcat)(cmd, "\"");
      VG_(strcat)(cmd, di->filename);
+     VG_(strcat)(cmd, "\"");
      VG_(message)(Vg_DebugMsg, "run: %s\n", cmd);
      r = VG_(system)( cmd );
      if (r)