aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Love2002-07-18 16:30:48 +0000
committerDave Love2002-07-18 16:30:48 +0000
commit20df7570070ab07d2dcb770cea58630f26e857c4 (patch)
tree27a7dbf7c1854b248c86c4ddd61754c7d9feff22 /src
parent1de0ddd35bc035144868b7f8af705619918e6a89 (diff)
downloademacs-20df7570070ab07d2dcb770cea58630f26e857c4.tar.gz
emacs-20df7570070ab07d2dcb770cea58630f26e857c4.zip
(Fload) <!load_dangerous_libraries>: Don't leak fd.
<version == 20>: Refuse to load.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/lread.c13
2 files changed, 16 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d4aaeb3d548..6b777088a12 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12002-07-18 Dave Love <fx@gnu.org>
2
3 * lread.c (Fload) <!load_dangerous_libraries>: Don't leak fd.
4 <version == 20>: Refuse to load.
5
12002-07-17 Dave Love <fx@gnu.org> 62002-07-17 Dave Love <fx@gnu.org>
2 7
3 * fns.c: Move coding.h. 8 * fns.c: Move coding.h.
diff --git a/src/lread.c b/src/lread.c
index d2d55be637a..b4dc71514d9 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -758,8 +758,11 @@ Return t if file exists. */)
758 { 758 {
759 safe_p = 0; 759 safe_p = 0;
760 if (!load_dangerous_libraries) 760 if (!load_dangerous_libraries)
761 error ("File `%s' was not compiled in Emacs", 761 {
762 XSTRING (found)->data); 762 emacs_close (fd);
763 error ("File `%s' was not compiled in Emacs",
764 XSTRING (found)->data);
765 }
763 else if (!NILP (nomessage)) 766 else if (!NILP (nomessage))
764 message_with_string ("File `%s' not compiled in Emacs", found, 1); 767 message_with_string ("File `%s' not compiled in Emacs", found, 1);
765 } 768 }
@@ -778,9 +781,15 @@ Return t if file exists. */)
778 781
779 if (fd >= 0) 782 if (fd >= 0)
780 emacs_close (fd); 783 emacs_close (fd);
784 /* load-with-code-conversion currently fails with
785 emacs-mule non-ASCII doc strings. */
786 error ("Can't currently load Emacs 20/1-compiled files: %s",
787 XSTRING (found)->data);
788#if 0
781 val = call4 (intern ("load-with-code-conversion"), found, file, 789 val = call4 (intern ("load-with-code-conversion"), found, file,
782 NILP (noerror) ? Qnil : Qt, 790 NILP (noerror) ? Qnil : Qt,
783 NILP (nomessage) ? Qnil : Qt); 791 NILP (nomessage) ? Qnil : Qt);
792#endif
784 return unbind_to (count, val); 793 return unbind_to (count, val);
785 } 794 }
786 795