Date: Sun, 21 Nov 1999 20:37:32 -0200 (EDT) From: Joao Carlos Mendes Luis <jonny@jonny.eng.br> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/15030: id3ren, port update Message-ID: <199911212237.UAA19809@roma.coe.ufrj.br>
next in thread | raw e-mail | index | archive | help
>Number: 15030 >Category: ports >Synopsis: New patch, i3dren >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Nov 21 14:40:01 PST 1999 >Closed-Date: >Last-Modified: >Originator: Joao Carlos Mendes Luis >Release: FreeBSD 2.2.8-STABLE i386 >Organization: COPPE/UFRJ >Environment: >Description: Per user request: Subject: id3ren patch Date: Mon, 15 Nov 1999 15:34:16 -0600 From: "Paul D. Schmidt" <pds@uberhacker.org> To: jonny@jonny.eng.br Hello, id3ren creates invalid ID3 tags due to improper buffer initialization. To the FreeBSD porter: attached is a unified diff... patch < id3tag.patch should fix it. To the original author: all you really have to do is insert line 368 into the program: (right before the fgets) memset(string, 0, size); Since the strings for songname, artist, etc are written out completely, no matter what they contain, you must make sure to clear the buffer before writing new information to it otherwise this happens: This is a long song title\0\0\0\0\0 A short one\0ng song title\0\0\0\0 And programs that don't use null-terminated strings (such as perl) see it as "A short oneng song title" Thanks for writing this useful program, Paul Schmidt >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # id3ren # id3ren/files # id3ren/files/md5 # id3ren/pkg # id3ren/pkg/COMMENT # id3ren/pkg/DESCR # id3ren/pkg/PLIST # id3ren/patches # id3ren/patches/patch-aa # id3ren/patches/patch-ab # id3ren/Makefile # echo c - id3ren mkdir -p id3ren > /dev/null 2>&1 echo c - id3ren/files mkdir -p id3ren/files > /dev/null 2>&1 echo x - id3ren/files/md5 sed 's/^X//' >id3ren/files/md5 << 'END-of-id3ren/files/md5' XMD5 (id3ren97a.zip) = 4cb10259b1b523c0f9cd064034fcfaaa END-of-id3ren/files/md5 echo c - id3ren/pkg mkdir -p id3ren/pkg > /dev/null 2>&1 echo x - id3ren/pkg/COMMENT sed 's/^X//' >id3ren/pkg/COMMENT << 'END-of-id3ren/pkg/COMMENT' XMpeg Audio Layer 3 util: rename files, edit tags, search, etc END-of-id3ren/pkg/COMMENT echo x - id3ren/pkg/DESCR sed 's/^X//' >id3ren/pkg/DESCR << 'END-of-id3ren/pkg/DESCR' XThe id3 Renamer is used to rename batches of mpeg3 files by reading the XID3 tag at the end of the file which contains the song name, artist, Xalbum, year, and a comment. The secondary function of id3 Renamer is Xa tagger, which can create, modify, or remove ID3 tags. X XWWW: http://tscnet.com/pages/badcrc/apps/id3ren/ X X-- XPorted by: Joao Carlos Mendes Luis <jonny@jonny.eng.br> END-of-id3ren/pkg/DESCR echo x - id3ren/pkg/PLIST sed 's/^X//' >id3ren/pkg/PLIST << 'END-of-id3ren/pkg/PLIST' Xbin/id3ren END-of-id3ren/pkg/PLIST echo c - id3ren/patches mkdir -p id3ren/patches > /dev/null 2>&1 echo x - id3ren/patches/patch-aa sed 's/^X//' >id3ren/patches/patch-aa << 'END-of-id3ren/patches/patch-aa' X--- Makefile.old Wed Mar 18 04:28:44 1998 X+++ Makefile Sun Feb 28 16:04:16 1999 X@@ -1,16 +1,18 @@ X-CFLAGS = -O2 -s -Wall X+CFLAGS += -O2 -s -Wall X CC = gcc X RM = rm -f X-INSTALL = install -s -m 755 X-INSTALL_DIR = .. X+INSTALL = install -cs -m 755 -o root -g wheel X+INSTALL_DIR = ${PREFIX}/bin X INSTALL_NAME = id3ren X X SOURCES = id3ren.c id3tag.c file.c misc.c X X-all: X+all: ${INSTALL_NAME} X+ X+${INSTALL_NAME}: X ${CC} ${CFLAGS} -o ${INSTALL_NAME} ${SOURCES} X X-install: all X+install: ${INSTALL_NAME} X ${INSTALL} ${INSTALL_NAME} ${INSTALL_DIR}/${INSTALL_NAME} X X clean: END-of-id3ren/patches/patch-aa echo x - id3ren/patches/patch-ab sed 's/^X//' >id3ren/patches/patch-ab << 'END-of-id3ren/patches/patch-ab' X--- id3tag.c.orig Wed Mar 18 20:18:34 1998 X+++ id3tag.c Sun Nov 21 20:30:14 1999 X@@ -365,6 +365,8 @@ X return TRUE; X } X X+ memset(string, 0, size); X+ X fgets(string, size, stdin); X X if (string[strlen(string)-1] == '\n') END-of-id3ren/patches/patch-ab echo x - id3ren/Makefile sed 's/^X//' >id3ren/Makefile << 'END-of-id3ren/Makefile' X# New ports collection makefile for: id3ren X# URL: http://tscnet.com/pages/badcrc/apps/id3ren/ X# Version required: 0.97a X# Date created: 28 February 1999 X# Whom: Joao Carlos Mendes Luis <jonny@jonny.eng.br> X# X# $FreeBSD: ports/audio/id3ren/Makefile,v 1.3 1999/08/25 04:35:36 obrien Exp $ X# X XDISTNAME= id3ren97a XPKGNAME= id3ren-0.97a XCATEGORIES= audio XMASTER_SITES= http://tscnet.com/pages/badcrc/apps/id3ren/ X XMAINTAINER= jonny@jonny.eng.br X XUSE_ZIP= yes XWRKSRC= ${WRKDIR}/id3ren/src X X.include <bsd.port.mk> END-of-id3ren/Makefile exit >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199911212237.UAA19809>