# # patch "ChangeLog" # from [54247160898c309e45c76a77cd1b98145a8aafcc] # to [e3991b964f3eba0e8e10c001bc9c4dbec0dd9fb9] # # patch "rcs_import.cc" # from [3e5ca94d659400cda4b3858261ed966cec3d9687] # to [8373f2d2ce0e3ea6e5ac087666ebca573c49d2e6] # --- ChangeLog +++ ChangeLog @@ -1,3 +1,8 @@ +2005-05-13 Ulrich Drepper + + * rcs_import.cc (process_one_hunk): Improve handling of corrupt + RCS files. + 2005-05-13 Matthew Gregan * testsuite.at: Fix typo error in Win32 kill logic that was --- rcs_import.cc +++ rcs_import.cc @@ -334,12 +334,13 @@ assert(directive.size() > 1); ++i; - char code; - int pos, len; - sscanf(directive.c_str(), " %c %d %d", &code, &pos, &len); - try { + char code; + int pos, len; + if (sscanf(directive.c_str(), " %c %d %d", &code, &pos, &len) != 3) + throw oops("illformed directive '" + directive + "'"); + if (code == 'a') { // 'ax y' means "copy from source to dest until cursor == x, then