Gnus development mailing list
 help / color / mirror / Atom feed
* password.el
@ 2006-12-26  5:41 Daiki Ueno
  2006-12-26 18:30 ` password.el Simon Josefsson
  0 siblings, 1 reply; 3+ messages in thread
From: Daiki Ueno @ 2006-12-26  5:41 UTC (permalink / raw)
  Cc: ding

Hello,

On Emacs 22, the following code signals an error

(require 'password)
(password-cache-add "0" (string (make-char 'latin-iso8859-1 100)))
(password-cache-remove "0")

Debugger entered--Lisp error: (error "Attempt to change byte length of a string")
  fillarray("\x8e4" 95)

The following patch will fix this.

Index: password.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/password.el,v
retrieving revision 7.12
diff -u -r7.12 password.el
--- password.el	30 Apr 2006 09:44:06 -0000	7.12
+++ password.el	26 Dec 2006 05:41:18 -0000
@@ -113,7 +113,9 @@
 user again."
   (let ((password (symbol-value (intern-soft key password-data))))
     (when password
-      (fillarray password ?_)
+      (if (fboundp 'clear-string)
+	  (clear-string password)
+	(fillarray password ?_))
       (unintern key password-data))))
 
 (defun password-cache-add (key password)

-- 
Daiki Ueno



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-12-28  8:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-26  5:41 password.el Daiki Ueno
2006-12-26 18:30 ` password.el Simon Josefsson
2006-12-28  8:44   ` password.el Daiki Ueno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).