Fix bug in ogg123 when unknown comments are found in the tags. Found

by and patch from claudio@, with a small nit from jasper@.

ok claudio@ naddy@ (maintainer)
This commit is contained in:
weerd 2009-07-17 08:20:37 +00:00
parent bbafda2af6
commit 48225afcf7
2 changed files with 16 additions and 2 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.35 2008/05/11 22:17:28 jasper Exp $
# $OpenBSD: Makefile,v 1.36 2009/07/17 08:20:37 weerd Exp $
COMMENT= play, encode, and manage Ogg Vorbis files
DISTNAME= vorbis-tools-1.2.0
PKGNAME= ${DISTNAME}p0
PKGNAME= ${DISTNAME}p1
CATEGORIES= audio
HOMEPAGE= http://www.vorbis.com/

View File

@ -0,0 +1,14 @@
strcspn(3) does not work this way, fix SIGSEGV on unknown comments
$OpenBSD: patch-ogg123_vorbis_comments_c,v 1.1 2009/07/17 08:20:37 weerd Exp $
--- ogg123/vorbis_comments.c.orig Wed Jul 8 18:44:47 2009
+++ ogg123/vorbis_comments.c Wed Jul 8 18:45:13 2009
@@ -72,7 +72,7 @@ char *lookup_comment_prettyprint (char *comment, int *
/* Use default formatting */
j = strcspn(comment, "=");
- if (j) {
+ if (j != strlen(comment)) {
*offset = j + 1;
s = malloc(j + 2);
if (s == NULL) {