readline82-001 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. READLINE PATCH REPORT
  2. =====================
  3. Readline-Release: 8.2
  4. Patch-ID: readline82-001
  5. Bug-Reported-by: Kan-Ru Chen <koster@debian.org>
  6. Bug-Reference-ID:
  7. Bug-Reference-URL: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021109
  8. Bug-Description:
  9. Starting a readline application with an invalid locale specification for
  10. LC_ALL/LANG/LC_CTYPE can cause it crash on the first call to readline.
  11. Patch (apply with `patch -p0'):
  12. *** ../readline-8.2-patched/nls.c 2022-08-15 09:38:51.000000000 -0400
  13. --- nls.c 2022-10-05 09:23:22.000000000 -0400
  14. ***************
  15. *** 142,145 ****
  16. --- 142,149 ----
  17. lspec = "";
  18. ret = setlocale (LC_CTYPE, lspec); /* ok, since it does not change locale */
  19. + if (ret == 0 || *ret == 0)
  20. + ret = setlocale (LC_CTYPE, (char *)NULL);
  21. + if (ret == 0 || *ret == 0)
  22. + ret = RL_DEFAULT_LOCALE;
  23. #else
  24. ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec;
  25. *** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500
  26. --- patchlevel 2014-03-21 08:28:40.000000000 -0400
  27. ***************
  28. *** 1,3 ****
  29. # Do not edit -- exists only for use by patch
  30. ! 0
  31. --- 1,3 ----
  32. # Do not edit -- exists only for use by patch
  33. ! 1