Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 285105 - media-sound/grip-3.3.1-r2 - buffer overflow detected when writing ID3v2 tags
Summary: media-sound/grip-3.3.1-r2 - buffer overflow detected when writing ID3v2 tags
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Sound Team
URL: http://forums.gentoo.org/viewtopic.ph...
Whiteboard:
Keywords:
: 300254 340367 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-09-15 16:03 UTC by Adrian Smith
Modified: 2015-01-05 23:54 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
grip-3.3.1-genre.patch (grip-3.3.1-genre.patch,319 bytes, patch)
2009-09-15 16:33 UTC, Lars Wendler (Polynomial-C) (RETIRED)
Details | Diff
grip-3.3.1-id3v2.patch (grip-3.3.1-id3v2.patch,311 bytes, patch)
2009-09-20 20:50 UTC, Gary HUnt
Details | Diff
patched ebuild (grip-3.3.1-r2.ebuild,1.31 KB, text/plain)
2009-09-20 20:53 UTC, Gary HUnt
Details
Patch to fix the bug and s/sprintf/snprintf/ (grip-3.3.1-invalid-genre-size.patch,799 bytes, patch)
2010-04-24 09:17 UTC, Frédéric Fauberteau
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Smith 2009-09-15 16:03:05 UTC
Greetings - problem with grip. It rips the disk just fine (I set it to rip and then encode while trying to figure out the problem). However once it stars to encode it crashes. It will encode (as mp3) the first file, then crash. Terminal output and other data is below. I tried 'emerge -ae grip' and that had no effect. Also tried emerging the previous version of grip, same effect. Did revdep-rebuild as well, just to be sure. No problems found there.

I removed all the .grip* config files to start from scratch and discovered that what appears to be making it crash is writing ID3v2 tags to the mp3 files. If I don't add ID3 tags, or only ID3v1, everything is happy. What might be going on? Thanks. Skippy

-------------------------------------

skippy $ emerge -pv grip

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild R ] media-sound/grip-3.3.1-r2 USE="nls vorbis" 0 kB 


Reproducible: Always

Steps to Reproduce:
1. start grip
2. rip a CD 
3. have generate ID3v2 tags option enabled

Actual Results:  
skippy $ grip
Xlib: extension "RANDR" missing on display ":0.0".
*** buffer overflow detected ***: grip terminated
======= Backtrace: =========
/lib/libc.so.6(__fortify_fail+0x37)[0x7f9f4d412a07]
/lib/libc.so.6[0x7f9f4d4107e0]
/lib/libc.so.6[0x7f9f4d40fad9]
/lib/libc.so.6(_IO_default_xsputn+0x85)[0x7f9f4d39c935]
/lib/libc.so.6(_IO_vfprintf+0x719)[0x7f9f4d36d359]
/lib/libc.so.6(__vsprintf_chk+0x9d)[0x7f9f4d40fb7d]
/lib/libc.so.6(__sprintf_chk+0x80)[0x7f9f4d40fac0]
grip[0x41b9cb]
grip[0x419171]
grip[0x40b428]
grip[0x4097a0]
/usr/lib/libglib-2.0.so.0[0x7f9f4e61053b]
/usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x249)[0x7f9f4e60fe09]
/usr/lib/libglib-2.0.so.0[0x7f9f4e613558]
/usr/lib/libglib-2.0.so.0(g_main_loop_run+0x1cd)[0x7f9f4e613a4d]
/usr/lib/libgtk-x11-2.0.so.0(gtk_main+0xa7)[0x7f9f52260817]
grip[0x409783]
/lib/libc.so.6(__libc_start_main+0xe6)[0x7f9f4d348a26]
grip[0x4094e9]
======= Memory map: ========
00400000-0042f000 r-xp 00000000 08:13 730608 /usr/bin/grip
0062f000-00630000 r--p 0002f000 08:13 730608 /usr/bin/grip
00630000-00635000 rw-p 00030000 08:13 730608 /usr/bin/grip
00635000-00a58000 rw-p 00000000 00:00 0 [heap]
7f9f46f6b000-7f9f472f1000 r--p 00000000 08:13 5686019 /usr/share/icons/hicolor/icon-theme.cache
7f9f472f1000-7f9f4733b000 r--p 00000000 08:13 991400 /usr/share/fonts/dejavu/DejaVuSansMono-Bold.ttf
7f9f4733b000-7f9f4738a000 r--p 00000000 08:13 991403 /usr/share/fonts/dejavu/DejaVuSansMono.ttf
7f9f4738a000-7f9f47422000 r--p 00000000 08:13 991395 /usr/share/fonts/dejavu/DejaVuSans.ttf
7f9f47422000-7f9f47424000 r-xp 00000000 08:13 852584 /usr/lib64/pango/1.6.0/modules/pango-basic-fc.so
7f9f47424000-7f9f47623000 ---p 00002000 08:13 852584 /usr/lib64/pango/1.6.0/modules/pango-basic-fc.so
7f9f47623000-7f9f47624000 r--p 00001000 08:13 852584 /usr/lib64/pango/1.6.0/modules/pango-basic-fc.so
7f9f47624000-7f9f47625000 rw-p 00002000 08:13 852584 /usr/lib64/pango/1.6.0/modules/pango-basic-fc.so
7f9f47625000-7f9f4762b000 r-xp 00000000 08:13 1089718 /usr/lib64/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.so
7f9f4762b000-7f9f4782b000 ---p 00006000 08:13 1089718 /usr/lib64/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.so
7f9f4782b000-7f9f4782c000 r--p 00006000 08:13 1089718 /usr/lib64/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.so
7f9f4782c000-7f9f4782d000 rw-p 00007000 08:13 1089718 /usr/lib64/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.so
7f9f4782d000-7f9f47831000 r-xp 00000000 08:13 1089716 /usr/lib64/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so
7f9f47831000-7f9f47a31000 ---p 00004000 08:13 1089716 /usr/lib64/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so
7f9f47a31000-7f9f47a32000 r--p 00004000 08:13 1089716 /usr/lib64/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so
7f9f47a32000-7f9f47a33000 rw-p 00005000 08:13 1089716 /usr/lib64/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so
7f9f47a33000-7f9f47a3e000 r-xp 00000000 08:13 1130651 /lib64/libnss_files-2.10.1.so
7f9f47a3e000-7f9f47c3e000 ---p 0000b000 08:13 1130651 /lib64/libnss_files-2.10.1.so
7f9f47c3e000-7f9f47c3f000 r--p 0000b000 08:13 1130651 /lib64/libnss_files-2.10.1.so
7f9f47c3f000-7f9f47c40000 rw-p 0000c000 08:13 1130651 /lib64/libnss_files-2.10.1.so
7f9f47c40000-7f9f47c4a000 r-xp 00000000 08:13 1131008 /lib64/libnss_nis-2.10.1.so
7f9f47c4a000-7f9f47e49000 ---p 0000a000 08:13 1131008 /lib64/libnss_nis-2.10.1.so
7f9f47e49000-7f9f47e4a000 r--p 00009000 08:13 1131008 /lib64/libnss_nis-2.10.1.so
7f9f47e4a000-7f9f47e4b000 rw-p 0000a000 08:13 1131008 /lib64/libnss_nis-2.10.1.so
7f9f47e4b000-7f9f47e60000 r-xp 00000000 08:13 1130988 /lib64/libnsl-2.10.1.so
7f9f47e60000-7f9f4805f000 ---p 00015000 08:13 1130988 /lib64/libnsl-2.10.1.so
7f9f4805f000-7f9f48060000 r--p 00014000 08:13 1130988 /lib64/libnsl-2.10.1.so
7f9f48060000-7f9f48061000 rw-p 00015000 08:13 1130988 /lib64/libnsl-2.10.1.so
7f9f48061000-7f9f48063000 rw-p 00000000 00:00 0
7f9f48063000-7f9f4806a000 r-xp 00000000 08:13 1130667 /lib64/libnss_compat-2.10.1.so
7f9f4806a000-7f9f48269000 ---p 00007000 08:13 1130667 /lib64/libnss_compat-2.10.1.so
7f9f48269000-7f9f4826a000 r--p 00006000 08:13 1130667 /lib64/libnss_compat-2.10.1.so
7f9f4826a000-7f9f4826b000 rw-p 00007000 08:13 1130667 /lib64/libnss_compat-2.10.1.so
7f9f4826b000-7f9f4d32a000 r--p 00000000 08:13 5752381 /usr/lib64/locale/locale-archive
7f9f4d32a000-7f9f4d47b000 r-xp 00000000 08:13 1130980 /lib64/libc-2.10.1.so
7f9f4d47b000-7f9f4d67b000 ---p 00151000 08:13 1130980 /lib64/libc-2.10.1.so
7f9f4d67b000-7f9f4d67f000 r--p 00151000 08:13 1130980 /lib64/libc-2.10.1.so
7f9f4d67f000-7f9f4d680000 rw-p 00155000 08:13 1130980 /lib64/libc-2.10.1.so
7f9f4d680000-7f9f4d685000 rw-p 00000000 00:00 0
7f9f4d685000-7f9f4d69a000 r-xp 00000000 08:13 18731 /lib64/libgcc_s.so.1
7f9f4d69a000-7f9f4d899000 ---p 00015000 08:13 18731 /lib64/libgcc_s.so.1
7f9f4d899000-7f9f4d89a000 r--p 00014000 08:13 18731 /lib64/libgcc_s.so.1
7f9f4d89a000-7f9f4d89b000 rw-p 00015000 08:13 18731 /lib64/libgcc_s.so.1
7f9f4d89b000-7f9f4d91d000 r-xp 00000000 08:13 1130994 /lib64/libm-2.10.1.so
7f9f4d91d000-7f9f4db1c000 ---p 00082000 08:13 1130994 /lib64/libm-2.10.1.so
7f9f4db1c000-7f9f4db1d000 r--p 00081000 08:13 1130994 /lib64/libm-2.10.1.so
7f9f4db1d000-7f9f4db1e000 rw-p 00082000 08:13 1130994 /lib64/libm-2.10.1.so
7f9f4db1e000-7f9f4db20000 r-xp 00000000 08:13 1130995 /lib64/libdl-2.10.1.so
7f9f4db20000-7f9f4dd20000 ---p 00002000 08:13 1130995 /lib64/libdl-2.10.1.so
7f9f4dd20000-7f9f4dd21000 r--p 00002000 08:13 1130995 /lib64/libdl-2.10.1.so
7f9f4dd21000-7f9f4dd22000 rw-p 00003000 08:13 1130995 /lib64/libdl-2.10.1.so
7f9f4dd22000-7f9f4dd35000 r-xp 00000000 08:13 1130968 /lib64/libresolv-2.10.1.so
7f9f4dd35000-7f9f4df35000 ---p 00013000 08:13 1130968 /lib64/libresolv-2.10.1.so
7f9f4df35000-7f9f4df36000 r--p 00013000 08:13 1130968 /lib64/libresolv-2.10.1.so
7f9f4df36000-7f9f4df37000 rw-p 00014000 08:13 1130968 /lib64/libresolv-2.10.1.so
7f9f4df37000-7f9f4df39000 rw-p 00000000 00:00 0
7f9f4df39000-7f9f4df48000 r-xp 00000000 08:13 1065203 /usr/lib64/liblber-2.4.so.2.5.0
7f9f4df48000-7f9f4e147000 ---p 0000f000 08:13 1065203 /usr/lib64/liblber-2.4.so.2.5.0
7f9f4e147000-7f9f4e148000 r--p 0000e000 08:13 1065203 /usr/lib64/liblber-2.4.so.2.5.0
7f9f4e148000-7f9f4e149000 rw-p 0000f000 08:13 1065203 /usr/lib64/liblber-2.4.so.2.5.0
7f9f4e149000-7f9f4e189000 r-xp 00000000 08:13 1065121 /usr/lib64/libldap-2.4.so.2.5.0
7f9f4e189000-7f9f4e389000 ---p 00040000 08:13 1065121 /usr/lib64/libldap-2.4.so.2.5.0
7f9f4e389000-7f9f4e38a000 r--p 00040000 08:13 1065121 /usr/lib64/libldap-2.4.so.2.5.0
7f9f4e38a000-7f9f4e38c000 rw-p 00041000 08:13 1065121 /usr/lib64/libldap-2.4.so.2.5.0
7f9f4e38c000-7f9f4e3d3000 r-xp 00000000 08:13 1049139 /usr/lib64/libcurl.so.4.1.1
7f9f4e3d3000-7f9f4e5d3000 ---p 00047000 08:13 1049139 /usr/lib64/libcurl.so.4.1.1
7f9f4e5d3000-7f9f4e5d4000 r--p 00047000 08:13 1049139 /usr/lib64/libcurl.so.4.1.1
7f9f4e5d4000-7f9f4e5d5000 rw-p 00048000 08:13 1049139 /usr/lib64/libcurl.so.4.1.1
7f9f4e5d5000-7f9f4e5d6000 rw-p 00000000 00:00 0
7f9f4e5d6000-7f9f4e6b8000 r-xp 00000000 08:13 1040646 /usr/lib64/libglib-2.0.so.0.2000.5
7f9f4e6b8000-7f9f4e8b7000 ---p 000e2000 08:13 1040646 /usr/lib64/libglib-2.0.so.0.2000.5
7f9f4e8b7000-7f9f4e8b8000 r--p 000e1000 08:13 1040646 /usr/lib64/libglib-2.0.so.0.2000.5
7f9f4e8b8000-7f9f4e8b9000 rw-p 000e2000 08:13 1040646 /usr/lib64/libglib-2.0.so.0.2000.5
7f9f4e8b9000-7f9f4e8ba000 rw-p 00000000 00:00 0
7f9f4e8ba000-7f9f4e8fd000 r-xp 00000000 08:13 1040649 /usr/lib64/libgobject-2.0.so.0.2000.5
7f9f4e8fd000-7f9f4eafc000 ---p 00043000 08:13 1040649 /usr/lib64/libgobject-2.0.so.0.2000.5
7f9f4eafc000-7f9f4eafd000 Aborted 

Expected Results:  
rip CD and generate ID3v2 tags.

skippy $ emerge --info
Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.3.3, glibc-2.10.1-r0, 2.6.30-gentoo-r6 x86_64)
=================================================================
System uname: Linux-2.6.30-gentoo-r6-x86_64-Intel-R-_Core-TM-_i7_CPU_920_@_2.67GHz-with-gentoo-2.0.1
Timestamp of tree: Sun, 13 Sep 2009 01:45:01 +0000
ccache version 2.4 [disabled]
app-shells/bash: 4.0_p28
dev-java/java-config: 2.1.9
dev-lang/python: 2.6.2-r1, 3.1.1
dev-util/ccache: 2.4-r8
dev-util/cmake: 2.6.4-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc: 0.4.3-r3
sys-apps/sandbox: 2.1
sys-devel/autoconf: 2.13, 2.63-r1
sys-devel/automake: 1.4_p6, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils: 2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool: 2.2.6a
virtual/os-headers: 2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.mirrors.easynews.com/linux/gentoo/ ftp://gentoo.chem.wisc.edu/gentoo/ ftp://gentoo.mirrors.tds.net/gentoo http://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles/ http://gentoo.mirrors.pair.com/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="en en_GB en_US"
MAKEOPTS="-j7"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl aim alsa amd64 amrnb amrub arts aspell berkdb bzip2 cdda cddb cdr cli consolekit cracklib crypt css cups dbus dillo dri dvd dvdr embedded encode exif extras ffmpeg flac fortran gdbm gimp gnome gpm gstreamer gtk handbook hddtemp iconv id3tag imagemagick imap ipod ipv6 isdnlog jack jadetex java jpeg jpeg2k kde kipi ladspa ldap libsamplerate lm_sensors mad midi mikmod mjpeg mmx mng mp3 mp4 mpeg mplayer mudflap multilib musepack musicbrainz mysql ncurses nls nptl nptlonly nvidia offensive ogg opengl openmp oscar oss pam pcre pdf perl png portaudio pppd pulseaudio python qt3support quicktime readline redeyes reflection scanner session smp sndfile soundtouch spamassassin spell spl sql sqlite sse sse2 ssl svg sysfs tcpd theora tiff twolame unicode vamp vcd vorbis wavpack wmf xinerama xorg xvid xvmc zlib" ALSA_CARDS="hda-intel intel8x0 intel8x0m" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB en_US" USERLAND="GNU" VIDEO_CARDS="nvidia fbdev vesa"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-09-15 16:33:44 UTC
Created attachment 204222 [details, diff]
grip-3.3.1-genre.patch

Does this patch help? I found it at https://bugs.launchpad.net/ubuntu/+source/grip/+bug/283658
Comment 2 Adrian Smith 2009-09-16 14:45:03 UTC
 
> Does this patch help? I found it at
> https://bugs.launchpad.net/ubuntu/+source/grip/+bug/283658
> 
Wow, nice find.  I will try this as soon as I can - might not be until the weekend.  Once done I will report how it went.  Thank you very much.  Skippy

Comment 3 Adrian Smith 2009-09-17 00:02:25 UTC
(In reply to comment #1)
> Created an attachment (id=204222) [edit]
> grip-3.3.1-genre.patch
> 
> Does this patch help? I found it at
> https://bugs.launchpad.net/ubuntu/+source/grip/+bug/283658
> 

Okay, I don't know how to correctly apply the patch.  :(

>>> Emerging (1 of 1) media-sound/grip-3.3.1-r2
 * grip-3.3.1.tar.gz RMD160 SHA1 SHA256 size ;-) ...                     [ ok ]
 * checking ebuild checksums ;-) ...                                     [ ok ]
 * checking auxfile checksums ;-) ...                                    [ ok ]
 * checking miscfile checksums ;-) ...                                   [ ok ]
>>> Unpacking source...
/var/tmp/portage/media-sound/grip-3.3.1-r2/temp/environment: line 2914: gnome2_src_unpack: command not found
 * Applying grip.patch ...

 * Failed Patch: grip.patch !
 *  ( /usr/portage/media-sound/grip/files/grip.patch )
 * 
 * Include in your bugreport the contents of:
 * 
 *   /var/tmp/portage/media-sound/grip-3.3.1-r2/temp/grip.patch-16885.out

 * 
 * ERROR: media-sound/grip-3.3.1-r2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_unpack
 *             environment, line 2915:  Called epatch '/usr/portage/media-sound/grip/files/grip.patch'
 *             environment, line 1588:  Called die
 * The specific snippet of code:
 *                   die "Failed Patch: ${patchname}!";
 *  The die message:
 *   Failed Patch: grip.patch!
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/media-sound/grip-3.3.1-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-sound/grip-3.3.1-r2/temp/environment'.
 * 


I created files/grip.patch with the contents

>>> Emerging (1 of 1) media-sound/grip-3.3.1-r2
 * grip-3.3.1.tar.gz RMD160 SHA1 SHA256 size ;-) ...                     [ ok ]
 * checking ebuild checksums ;-) ...                                     [ ok ]
 * checking auxfile checksums ;-) ...                                    [ ok ]
 * checking miscfile checksums ;-) ...                                   [ ok ]
>>> Unpacking source...
/var/tmp/portage/media-sound/grip-3.3.1-r2/temp/environment: line 2914: gnome2_src_unpack: command not found
 * Applying grip.patch ...

 * Failed Patch: grip.patch !
 *  ( /usr/portage/media-sound/grip/files/grip.patch )
 * 
 * Include in your bugreport the contents of:
 * 
 *   /var/tmp/portage/media-sound/grip-3.3.1-r2/temp/grip.patch-16885.out

 * 
 * ERROR: media-sound/grip-3.3.1-r2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_unpack
 *             environment, line 2915:  Called epatch '/usr/portage/media-sound/grip/files/grip.patch'
 *             environment, line 1588:  Called die
 * The specific snippet of code:
 *                   die "Failed Patch: ${patchname}!";
 *  The die message:
 *   Failed Patch: grip.patch!
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/media-sound/grip-3.3.1-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-sound/grip-3.3.1-r2/temp/environment'.
 * 


And then added 

src_unpack() {

        # fixing crash for ID3v2 tags
        epatch "${FILESDIR}"/grip.patch
}


to the ebuild.  I've only done a patch once before so I'm not experienced with this.  Can anyone assist please?  Thank you, Skippy
Comment 4 Adrian Smith 2009-09-17 00:04:57 UTC
I also don't know how to cut and paste, please see the corrected message below



I created files/grip.patch with the contents

--- grip-3.3.1/src/id3.c	2005-06-26 03:00:55.000000000 +0900
+++ grip-3.3.1-hfujita/src/id3.c	2009-02-01 00:13:08.000000000 +0900
@@ -252,7 +252,7 @@
       
       if ( frames[ i ] ) {
 	char *c_data = NULL;
-	char gen[ 5 ] = "(   )";
+	char gen[ 6 ] = "(   )";
 	char trk[ 4 ] = "   ";
 	
 	switch( frameids[ i ] ) {
Comment 5 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-09-17 05:07:01 UTC
In case you know how to create a portage-overlay, you could download a working grip ebuild plus patch from here:

http://polynomial-c.homelinux.net/pub/gentoo/portage/
Comment 6 Gary HUnt 2009-09-20 20:50:41 UTC
Created attachment 204745 [details, diff]
grip-3.3.1-id3v2.patch
Comment 7 Gary HUnt 2009-09-20 20:53:08 UTC
Created attachment 204748 [details]
patched ebuild 

Try this ebuild change with the above attachment?
Comment 8 Adrian Smith 2009-09-21 12:36:40 UTC
(In reply to comment #5)
> In case you know how to create a portage-overlay, you could download a working
> grip ebuild plus patch from here:
> 
> http://polynomial-c.homelinux.net/pub/gentoo/portage/
> 

Thank you.  Yes I was able to use the patch & ebuild from here.  The problem appears to be fixed.  I was able to rip & encode with ID3v2 tags 2 CDs that were failing previously.  Thanks again!
Comment 9 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2010-04-07 07:45:36 UTC
*** Bug 300254 has been marked as a duplicate of this bug. ***
Comment 10 Frédéric Fauberteau 2010-04-24 09:17:17 UTC
Created attachment 228969 [details, diff]
Patch to fix the bug and s/sprintf/snprintf/

Sorry, but my C teachers would have killed me if I used sprintf instead of snprintf ...
Comment 11 Justin Lecher (RETIRED) gentoo-dev 2010-10-10 17:32:07 UTC
*** Bug 340367 has been marked as a duplicate of this bug. ***
Comment 12 James Broadhead 2010-10-10 17:53:29 UTC
(In reply to comment #11)
> *** Bug 340367 has been marked as a duplicate of this bug. ***
> 

Upstream is dead. Can we have this patch added to the tree?
Comment 13 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2010-10-15 16:42:21 UTC
+*grip-3.3.1-r3 (15 Oct 2010)
+
+  15 Oct 2010; Lars Wendler <polynomial-c@gentoo.org> -grip-3.3.1.ebuild,
+  +grip-3.3.1-r3.ebuild, +files/grip-3.3.1-invalid-genre-size.patch:
+  Fixed segfault caused by invalid size in ID3 genre code. Thanks to Adrian
+  Smith for reporting this in bug #285105 and to Frédéric Fauberteau for
+  providing the patch.
+
Comment 14 Thomas Kohler 2011-12-27 16:56:16 UTC
Thank you for that patch. It works for me also. It is added to the portage now for "media-sound/grip-3.3.1-r3", but this version is masked at the moment.