From d9f634ea3a4b129c81074ba7b93815b2b8556491 Mon Sep 17 00:00:00 2001 From: owsla Date: Sat, 16 Jan 2010 18:47:12 +0000 Subject: Fix OverflowError on 64-bit systems when backing up symlinks with uid or gid above INT_MAX. This fix is the same as r77008 in the Python source. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@1060 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/CHANGELOG | 3 +++ rdiff-backup/rdiff_backup/cmodule.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index a8573c8..ba0746c 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -1,6 +1,9 @@ New in v1.3.4 (????/??/??) --------------------------- +Fix OverflowError on 64-bit systems when backing up symlinks with uid or gid +above INT_MAX. Thanks to Michel Le Cocq for the bug report. (Andrew Ferguson) + Start using Unicode internally for filenames. This fixes Unicode support on Windows (Josh Nisly) diff --git a/rdiff-backup/rdiff_backup/cmodule.c b/rdiff-backup/rdiff_backup/cmodule.c index ed82ed4..ea3f129 100644 --- a/rdiff-backup/rdiff_backup/cmodule.c +++ b/rdiff-backup/rdiff_backup/cmodule.c @@ -394,9 +394,9 @@ static PyObject * posix_lchown(PyObject *self, PyObject *args) { char *path = NULL; - int uid, gid; + long uid, gid; int res; - if (!PyArg_ParseTuple(args, "etii:lchown", + if (!PyArg_ParseTuple(args, "etll:lchown", Py_FileSystemDefaultEncoding, &path, &uid, &gid)) return NULL; -- cgit v1.2.1