Changeset bc7ebf6


Ignore:
Timestamp:
Mar 29, 2009, 3:56:10 PM (12 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
owl
Children:
61f7250
Parents:
c4b45ce
Message:
fix bad sprintf usage in get_startupargs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r488ebf6 rbc7ebf6  
    529529    len+=strlen(argv[i])+5;
    530530  }
    531   g->startupargs=malloc(len+5);
     531  g->startupargs=owl_malloc(len+5);
    532532
    533533  strcpy(g->startupargs, "");
    534534  for (i=0; i<argc; i++) {
    535     sprintf(g->startupargs, "%s%s ", g->startupargs, argv[i]);
     535    sprintf(g->startupargs + strlen(g->startupargs), "%s ", argv[i]);
    536536  }
    537537  g->startupargs[strlen(g->startupargs)-1]='\0';
Note: See TracChangeset for help on using the changeset viewer.