View | Details | Raw Unified
Collapse All | Expand All

(-)a/src/cmds/qsub.c (-2 / +9 lines)
 Lines 580-595   char **value; Link Here 
580
  char *curr_ptr;
580
  char *curr_ptr;
581
  char *equals;
581
  char *equals;
582
  static char tmpLine[65536];
582
  static char tmpLine[65536];
583
  char *s;
583
584
584
  /* we've reached the end */
585
  /* we've reached the end */
585
  if ((start == NULL) &&
586
  if ((start == NULL) &&
586
      (*tok_ptr == '\0'))
587
      (*tok_ptr == '\0'))
587
    return(0);
588
    return(0);
588
589
590
  s = NULL;
591
  /* XXX: may truncate input */
589
  if (start != NULL)
592
  if (start != NULL)
590
    strcpy(tmpLine, start);
593
    {
594
    strncpy(tmpLine, start, sizeof(tmpLine));
595
    tmpLine[sizeof(tmpLine) - 1] = '\0';
596
    s = tmpLine;
597
    }
591
598
592
  curr_ptr = smart_strtok(tmpLine,",",&tok_ptr,FALSE);
599
  curr_ptr = smart_strtok(s,",",&tok_ptr,FALSE);
593
600
594
  if ((curr_ptr == NULL))
601
  if ((curr_ptr == NULL))
595
    return(0);
602
    return(0);