$OpenBSD: patch-ogg123_vorbis_comments_c,v 1.2 2021/01/23 22:13:14 naddy Exp $

strcspn(3) does not work this way, fix SIGSEGV on unknown comments

Index: ogg123/vorbis_comments.c
--- ogg123/vorbis_comments.c.orig
+++ ogg123/vorbis_comments.c
@@ -74,7 +74,7 @@ char *lookup_comment_prettyprint (const char *comment,
 
   /* Use default formatting */
   j = strcspn(comment, "=");
-  if (j) {
+  if (j != strlen(comment)) {
     *offset = j + 1;
     s = malloc(j + 2);
     if (s == NULL) {
