comparison mercurial/osutil.c @ 5430:0bdea0abe62e

osutil.c: use strncpy instead of strncat
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Mon, 08 Oct 2007 21:37:25 -0300
parents eb1b6aaeb32e
children a7c832abd29c
comparison
equal deleted inserted replaced
5429:77cafe8f89e0 5430:0bdea0abe62e
195 195
196 kind = py_kind == Py_None ? -1 : PyInt_AsLong(py_kind); 196 kind = py_kind == Py_None ? -1 : PyInt_AsLong(py_kind);
197 if (kind != -1 && !keep) 197 if (kind != -1 && !keep)
198 continue; 198 continue;
199 199
200 strncat(path + len + 1, name, PATH_MAX - len); 200 strncpy(path + len + 1, name, PATH_MAX - len);
201 path[PATH_MAX] = 0; 201 path[PATH_MAX] = 0;
202 202
203 if (keep) { 203 if (keep) {
204 py_st = PyObject_CallObject( 204 py_st = PyObject_CallObject(
205 (PyObject *)&listdir_stat_type, ctor_args); 205 (PyObject *)&listdir_stat_type, ctor_args);