Show More
@@ -275,15 +275,20 static PyObject *parse_dirstate(PyObject | |||||
275 | PyObject *fname = NULL, *cname = NULL, *entry = NULL; |
|
275 | PyObject *fname = NULL, *cname = NULL, *entry = NULL; | |
276 | char state, *cur, *str, *cpos; |
|
276 | char state, *cur, *str, *cpos; | |
277 | int mode, size, mtime; |
|
277 | int mode, size, mtime; | |
278 | unsigned int flen; |
|
278 | unsigned int flen, len, pos = 40; | |
279 | int len, pos = 40; |
|
279 | int readlen; | |
280 |
|
280 | |||
281 | if (!PyArg_ParseTuple(args, "O!O!s#:parse_dirstate", |
|
281 | if (!PyArg_ParseTuple(args, "O!O!s#:parse_dirstate", | |
282 | &PyDict_Type, &dmap, |
|
282 | &PyDict_Type, &dmap, | |
283 | &PyDict_Type, &cmap, |
|
283 | &PyDict_Type, &cmap, | |
284 | &str, &len)) |
|
284 | &str, &readlen)) | |
285 | goto quit; |
|
285 | goto quit; | |
286 |
|
286 | |||
|
287 | if (readlen < 0) | |||
|
288 | goto quit; | |||
|
289 | ||||
|
290 | len = readlen; | |||
|
291 | ||||
287 | /* read parents */ |
|
292 | /* read parents */ | |
288 | if (len < 40) |
|
293 | if (len < 40) | |
289 | goto quit; |
|
294 | goto quit; |
General Comments 0
You need to be logged in to leave comments.
Login now