~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_format.cc

  • Committer: Brian Aker
  • Date: 2008-12-02 16:33:43 UTC
  • mfrom: (632.1.19 devel)
  • Revision ID: brian@tangent.org-20081202163343-007ifg17p0lvjga7
Merge from Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
  else if ((flag & MY_RELATIVE_PATH) && !test_if_hard_path(dev))
43
43
  {
44
44
    /* Put 'dir' before the given path */
45
 
    strmake(buff,dev,sizeof(buff)-1);
 
45
    strncpy(buff,dev,sizeof(buff)-1);
46
46
    pos=convert_dirname(dev,dir,NULL);
47
 
    strmake(pos,buff,sizeof(buff)-1- (int) (pos-dev));
 
47
    strncpy(pos,buff,sizeof(buff)-1- (int) (pos-dev));
48
48
  }
49
49
 
50
50
  if (flag & MY_PACK_FILENAME)
78
78
    size_t tmp_length;
79
79
    if (flag & MY_SAFE_PATH)
80
80
      return NULL;
81
 
    tmp_length= strlength(startpos);
82
 
    (void) strmake(to,startpos,cmin(tmp_length,FN_REFLEN-1));
 
81
    tmp_length= cmin(strlength(startpos), FN_REFLEN-1);
 
82
    strncpy(to,startpos,tmp_length);
 
83
    to[tmp_length]= '\0';
83
84
  }
84
85
  else
85
86
  {
88
89
      memmove(buff, name, length); /* Save name for last copy */
89
90
      name=buff;
90
91
    }
91
 
    pos=strmake(my_stpcpy(to,dev),name,length);
 
92
    pos= strncpy(my_stpcpy(to,dev),name,length) + length;
92
93
    (void) my_stpcpy(pos,ext);                  /* Don't convert extension */
93
94
  }
94
95
  /*