From b1eca24226d0cc47b7ad47f93ec4f726c4abf197 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Wed, 31 Oct 2007 04:43:19 +0000 Subject: [PATCH] Avoid a crash if we read an index value without a valid first_flist. --- rsync.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rsync.c b/rsync.c index 79ec3845..7f8d65cb 100644 --- a/rsync.c +++ b/rsync.c @@ -265,7 +265,8 @@ int read_ndx_and_attrs(int f_in, int *iflag_ptr, uchar *type_ptr, invalid_ndx: rprintf(FERROR, "Invalid file index: %d (%d - %d) with iflags %x [%s]\n", - ndx, first_flist->ndx_start - 1, first_flist->prev->ndx_end, + ndx, first_flist ? first_flist->ndx_start - 1 : -1, + first_flist ? first_flist->prev->ndx_end : -1, iflags, who_am_i()); exit_cleanup(RERR_PROTOCOL); } -- 2.34.1