Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
libencode-perl
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pkg
libencode-perl
Commits
54c875bd
Commit
54c875bd
authored
3 years ago
by
Apertis CI robot
Browse files
Options
Downloads
Plain Diff
Merge updates from debian/bullseye
parents
8ed4288e
ddc30bfc
Branches
debian/bullseye-nonfree
Branches containing commit
Tags
debian/1.20200212-1
Tags containing commit
2 merge requests
!3
Backport v2022 <- v2023dev1: Update from debian/bullseye
,
!2
Update from debian/bullseye for apertis/v2023dev1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
debian/changelog
+10
-0
10 additions, 0 deletions
debian/changelog
debian/patches/rt_139622_memory-leak.patch
+82
-0
82 additions, 0 deletions
debian/patches/rt_139622_memory-leak.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
93 additions
and
0 deletions
debian/changelog
+
10
−
0
View file @
54c875bd
libencode-perl (3.08-1+deb11u2) bullseye; urgency=medium
* Fix memory leak.
Add patch rt_139622_memory-leak.patch, taken from upstream releases 3.13,
3.14, 3.15 to fix a memory leak in Encode.xs.
Cf. https://rt.cpan.org/Ticket/Display.html?id=139622
(Closes: #995804)
-- gregor herrmann <gregoa@debian.org> Mon, 01 Nov 2021 16:15:54 +0100
libencode-perl (3.08-1+deb11u1+apertis0) apertis; urgency=medium
* Sync from debian/bullseye-security.
...
...
This diff is collapsed.
Click to expand it.
debian/patches/rt_139622_memory-leak.patch
0 → 100644
+
82
−
0
View file @
54c875bd
Description: Fix memory leak
Origin: upstream releases 3.13, 3.14, 3.15
Bug-Debian: https://bugs.debian.org/995804
Bug: https://rt.cpan.org/Ticket/Display.html?id=139622
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2021-11-01
--- a/Encode.xs
+++ b/Encode.xs
@@ -154,7 +154,7 @@
encode_method(pTHX_ const encode_t * enc
STRLEN sdone = 0;
/* We allocate slen+1.
PerlIO dumps core if this value is smaller than this. */
- SV *dst = newSV(slen+1);
+ SV *dst = sv_2mortal(newSV(slen+1));
U8 *d = (U8 *)SvPVX(dst);
STRLEN dlen = SvLEN(dst)-1;
int code = 0;
@@ -810,13 +810,12 @@
CODE:
tmp = encode_method(aTHX_ enc, enc->t_utf8, src, s, slen, check,
&offset, term, &code, fallback_cb);
sv_catsv(dst, tmp);
- SvREFCNT_dec(tmp);
SvIV_set(off, (IV)offset);
RETVAL = (code == ENCODE_FOUND_TERM);
OUTPUT:
RETVAL
-SV *
+void
Method_decode(obj,src,check_sv = &PL_sv_no)
SV * obj
SV * src
@@ -828,6 +827,7 @@
PREINIT:
encode_t *enc;
U8 *s;
STRLEN slen;
+ SV *ret;
INIT:
SvGETMAGIC(src);
SvGETMAGIC(check_sv);
@@ -841,13 +841,13 @@
CODE:
s = modify ? (U8 *)SvPV_force_nomg(src, slen) : (U8 *)SvPV_nomg(src, slen);
if (SvUTF8(src))
utf8_safe_downgrade(aTHX_ &src, &s, &slen, modify);
- RETVAL = encode_method(aTHX_ enc, enc->t_utf8, src, s, slen, check,
+ ret = encode_method(aTHX_ enc, enc->t_utf8, src, s, slen, check,
NULL, Nullsv, NULL, fallback_cb);
- SvUTF8_on(RETVAL);
-OUTPUT:
- RETVAL
+ SvUTF8_on(ret);
+ ST(0) = ret;
+ XSRETURN(1);
-SV *
+void
Method_encode(obj,src,check_sv = &PL_sv_no)
SV * obj
SV * src
@@ -859,6 +859,7 @@
PREINIT:
encode_t *enc;
U8 *s;
STRLEN slen;
+ SV *ret;
INIT:
SvGETMAGIC(src);
SvGETMAGIC(check_sv);
@@ -872,10 +873,10 @@
CODE:
s = modify ? (U8 *)SvPV_force_nomg(src, slen) : (U8 *)SvPV_nomg(src, slen);
if (!SvUTF8(src))
utf8_safe_upgrade(aTHX_ &src, &s, &slen, modify);
- RETVAL = encode_method(aTHX_ enc, enc->f_utf8, src, s, slen, check,
+ ret = encode_method(aTHX_ enc, enc->f_utf8, src, s, slen, check,
NULL, Nullsv, NULL, fallback_cb);
-OUTPUT:
- RETVAL
+ ST(0) = ret;
+ XSRETURN(1);
bool
Method_needs_lines(obj)
This diff is collapsed.
Click to expand it.
debian/patches/series
+
1
−
0
View file @
54c875bd
0001-mitigate-INC-pollution-when-loading-ConfigLocal.patch
rt_139622_memory-leak.patch
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment