[Mew-dist 15720] Re: mew-1.95b93 APOP
Kazu Yamamoto ( 山本和彦 )
kazu at example.com
2001年 1月 4日 (木) 18:08:49 JST
From: Shinji Ueda <ueda at example.com>
Subject: Re: [Mew-dist 15712] Re: mew-1.95b93 APOP
> APOPパスワードの文字数をいろいろ変えて、popアクセスしてみたと
> ころ、
>
> 2 - 6文字: OK
> 7 文字: NG
> 8 - 10文字: OK
>
> ということで、7文字のときだけ、Args out of range: となります。
55 文字境界問題のようです。< を <= に変えてみました。これでどうでしょ
う?
--かず
Index: mew-md5.el
===================================================================
RCS file: /usr/home/kazu/cvsroot/Mew/mew/mew-md5.el,v
retrieving revision 1.1
diff -c -r1.1 mew-md5.el
*** mew-md5.el 2000/05/24 01:49:29 1.1
--- mew-md5.el 2001/01/04 09:08:50
***************
*** 168,174 ****
(defun mew-md5-str64-to-table (str n)
"A function to create a vector of dot-pairs of 16bit-number from
! substring of STR, whose length is 16 byte from the position N."
(let ((i n) (j 0) (table (make-vector 16 nil)))
(while (< j 16)
(aset
--- 168,174 ----
(defun mew-md5-str64-to-table (str n)
"A function to create a vector of dot-pairs of 16bit-number from
! substring of STR, whose length is 64 byte from the position N."
(let ((i n) (j 0) (table (make-vector 16 nil)))
(while (< j 16)
(aset
***************
*** 195,203 ****
(mew-md5-calc (mew-md5-str64-to-table str j))
(setq i (1+ i))
(setq j (+ j 64)))
(setq pad (concat (substring str j) "\200" (make-string 71 0)))
(cond
! ((< r 55)
(setq n 1)
(aset pad 56 (% blen 256))
(aset pad 57 (/ blen 256)))
--- 195,204 ----
(mew-md5-calc (mew-md5-str64-to-table str j))
(setq i (1+ i))
(setq j (+ j 64)))
+ ;; 71 = 64 + 8 - 1
(setq pad (concat (substring str j) "\200" (make-string 71 0)))
(cond
! ((<= r 55)
(setq n 1)
(aset pad 56 (% blen 256))
(aset pad 57 (/ blen 256)))
Mew-dist メーリングリストの案内