Jeff, Thanks for tracking this down and proposing the correct fix. I've pushed the fix to git, and released a new BackupPC-XS-0.59.tar.gz on both git and cpan.
Craig On Sun, Apr 7, 2019 at 7:03 AM <backu...@kosowsky.org> wrote: > There is a simple but severe bug in bpc_attrib.c that causes v3 > version (BPC_ATTRIB_TYPE_UNIX) attrib files to either not read or read > in a partial/corrupted fashion. > > For me, this led to error messages of form: > unreasonable file name length 1048962 > > BackupPC_migrateV3toV4: can't read attribute file <mangled-filed-path> > > setVarInt botch: got negative argument -<number>; setting to 0 > > Plus presumably much silent corruption. > > Here is a simple patch: > > --- libbackuppc-xs-perl-0.58.orig/bpc_attrib.c > +++ libbackuppc-xs-perl-0.58/bpc_attrib.c > @@ -917,7 +917,7 @@ int bpc_attrib_dirRead(bpc_attrib_dir *d > return -1; > } > > - fileNameLen = getVarInt(&bufP, buf + nRead); > + fileNameLen = getVarInt_v3(&bufP, buf + nRead); > if ( fileNameLen > 2 * BPC_MAXPATHLEN - 16 ) { > bpc_logErrf("bpc_attrib_dirRead: got unreasonable file > name length %d\n", fileNameLen); > bpc_fileZIO_close(&fd); > > > _______________________________________________ > BackupPC-users mailing list > BackupPC-users@lists.sourceforge.net > List: https://lists.sourceforge.net/lists/listinfo/backuppc-users > Wiki: http://backuppc.wiki.sourceforge.net > Project: http://backuppc.sourceforge.net/ >
_______________________________________________ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List: https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki: http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/