GNU bug report logs -
#39980
[PATCH] gnus-shorten-url: Improve and avoid args-out-of-range error
Previous Next
Reported by: Štěpán Němec <stepnem <at> gmail.com>
Date: Sun, 8 Mar 2020 09:07:02 UTC
Severity: normal
Tags: patch
Done: Štěpán Němec <stepnem <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Štěpán Němec <stepnem <at> gmail.com> writes:
> 'gnus-shorten-url' (used by 'gnus-summary-browse-url') ignored
> fragment identifiers and didn't check substring bounds, in some cases
> leading to runtime errors, e.g.:
>
> (gnus-shorten-url "https://some.url.with/path/and#also_a_long_target" 40)
> ;; => Lisp error: (args-out-of-range "/path/and" -18 nil)
>
> This commit makes it account for #fragments and fixes faulty string
> computation, reusing existing helper function.
Looks like a good fix to me, but is there a reason this is a defsubst
instead of a defun?
+(defsubst string-truncate-left (string length)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 5 years and 68 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.