diff command

Description:

diff -y <file1> <file2> may fail with malloc error.

Additional info:

Steps to reproduce:

  1. Step 1

    file1

    file2

  2. diff -y file1 file2

    1. malloc(): invalid size (unsorted)..
  3. file1.alt

    file2.alt

  4. diff -y file1.alt file2.alt

    1. no problem
  5. compile code with patch, no issues with either of the above steps