[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as
From: |
Lars Magne Ingebrigtsen |
Subject: |
bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified |
Date: |
Sun, 27 Mar 2016 17:35:25 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Dmitry Gutov <dgutov@yandex.ru> writes:
> On 03/27/2016 06:31 AM, Óscar Fuentes wrote:
>
>> + (when (and (not (string= h ""))
>> + (string= h (secure-hash 'md5 (current-buffer))))
>> + (set-buffer-modified-p nil)))
>
> Hashes have collisions (and md5 is a bit famous for them). So in
> principle, I don't think using a hash is a good choice in this case.
md5 is famous for enabling attackers to construct strings with the same
hash, not for arbitrarily making strings hash to the same result.
It's less likely that the before/after `M-q' strings hash to the same
md5 than cosmic rays reprogramming your Emacs into vi, so:
> Either way, you'd have to keep the original string around, to compare
> against if the hashes match.
Not really.
(Ok, I'm exaggerating. Slightly!)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified, (continued)
- bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified, Eli Zaretskii, 2016/03/28
- bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified, Andreas Röhler, 2016/03/28
- bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified, Dmitry Gutov, 2016/03/27
- bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified, Óscar Fuentes, 2016/03/27
- bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified, Dmitry Gutov, 2016/03/27
- bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified, Lars Magne Ingebrigtsen, 2016/03/27
- bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified, Dmitry Gutov, 2016/03/27
- bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified, Óscar Fuentes, 2016/03/27
- bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified, Dmitry Gutov, 2016/03/27
- bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified, Óscar Fuentes, 2016/03/27
- bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified,
Lars Magne Ingebrigtsen <=
- bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified, Dmitry Gutov, 2016/03/27
- bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified, Lars Magne Ingebrigtsen, 2016/03/27
- bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified, Dmitry Gutov, 2016/03/27
- bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified, Jaakov, 2016/03/27
- bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified, Jaakov, 2016/03/27
bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified, Jaakov, 2016/03/22