readline63-002.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. READLINE PATCH REPORT
  2. =====================
  3. Readline-Release: 6.3
  4. Patch-ID: readline63-002
  5. Bug-Reported-by: Anatol Pomozov <anatol.pomozov@gmail.com>
  6. Bug-Reference-ID: <CAOMFOmXy3mT2So5GQ5F-smCVArQuAeBwZ2QKzgCtMeXJoDeYOQ@mail.gmail.com>
  7. Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2014-03/msg00010.html
  8. Bug-Description:
  9. When in callback mode, some readline commands can cause readline to seg
  10. fault by passing invalid contexts to callback functions.
  11. Patch (apply with `patch -p0'):
  12. *** ../readline-6.3/readline.c 2013-10-28 14:58:06.000000000 -0400
  13. --- readline.c 2014-03-10 14:15:02.000000000 -0400
  14. ***************
  15. *** 745,749 ****
  16. RL_CHECK_SIGNALS ();
  17. ! if (r == 0) /* success! */
  18. {
  19. _rl_keyseq_chain_dispose ();
  20. --- 745,750 ----
  21. RL_CHECK_SIGNALS ();
  22. ! /* We only treat values < 0 specially to simulate recursion. */
  23. ! if (r >= 0 || (r == -1 && (cxt->flags & KSEQ_SUBSEQ) == 0)) /* success! or failure! */
  24. {
  25. _rl_keyseq_chain_dispose ();
  26. *** ../readline-6.3/patchlevel 2013-11-15 08:11:11.000000000 -0500
  27. --- patchlevel 2014-03-21 08:28:40.000000000 -0400
  28. ***************
  29. *** 1,3 ****
  30. # Do not edit -- exists only for use by patch
  31. ! 1
  32. --- 1,3 ----
  33. # Do not edit -- exists only for use by patch
  34. ! 2