diff --git a/ChangeLog b/ChangeLog index 6e106c6..84e1f84 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2000-08-19 Bruno Haible + * src/key-list.cc (Output_Compare_Strncmp::output_comparison): + After the call to strncmp, verify that expr2 is not longer than + `len'. + Reported by Carlo Wood . + * src/key-list.cc (Key_List::output_lookup_function_body): Avoid emitting the loop for dealing with duplicates if total_duplicates == 0. diff --git a/src/key-list.cc b/src/key-list.cc index 30f276e..8a2f7c2 100644 --- a/src/key-list.cc +++ b/src/key-list.cc @@ -805,7 +805,9 @@ void Output_Compare_Strncmp::output_comparison (const Output_Expr& expr1, expr1.output_expr (); printf (" + 1, "); expr2.output_expr (); - printf (" + 1, len - 1)"); + printf (" + 1, len - 1) && "); + expr2.output_expr (); + printf ("[len] == '\\0'"); } /* ------------------------------------------------------------------------- */