recode dumps core if filename >= 200 characters

Bug #1785336 reported by Paulo Marcel Coelho Aragão on 2018-08-03
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
recode (Debian)
New
Unknown
recode (Ubuntu)
Undecided
Unassigned

Bug Description

If a filename has 200 or more characters, recode aborts, dumping core.

To reproduce:

1. Generate a filename with 200 characters:

paulo:~/tmp$ file=$(printf 'f%.0s' {1..200})

2. Create a file with this name:

paulo:~/tmp$ echo ã >$file

3. Try to recode this file:

paulo:~/tmp$ recode -v u8..latin1 $file
Request: UTF-8..:libiconv:..ISO-8859-1
Shrunk to: UTF-8..ISO-8859-1
*** buffer overflow detected ***: recode terminated
Aborted (core dumped)

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: recode 3.6-23
ProcVersionSignature: Ubuntu 4.15.0-29.31-generic 4.15.18
Uname: Linux 4.15.0-29-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
CurrentDesktop: XFCE
Date: Fri Aug 3 19:09:07 2018
Dependencies:
 gcc-8-base 8-20180414-1ubuntu2
 libc6 2.27-3ubuntu1
 libgcc1 1:8-20180414-1ubuntu2
 librecode0 3.6-23
InstallationDate: Installed on 2018-04-28 (97 days ago)
InstallationMedia: Xubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
SourcePackage: recode
UpgradeStatus: No upgrade log present (probably fresh install)

Hans Joachim Desserud (hjd) wrote :

Thanks for taking your time to report this issue and help making Ubuntu better.

I was able to reproduce this issue by attempting to run recode 3.6-23 on a very long file name on Ubuntu Cosmic. I also found what I believe to be a corresponding Debian bug report, so I have attached a bug watch.

Changed in recode (Ubuntu):
status: New → Confirmed
tags: added: cosmic

I built recode from what I believed to be the upstream source:

https://github.com/rrthomas/recode/

and the bug is not there, although I couldn't pinpoint the specific commit that fixed it.

Changed in recode (Debian):
status: Unknown → New
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.