diff --git a/src/liboggz/oggz_comments.c b/src/liboggz/oggz_comments.c
index a09cbde925741ba38b1db94406895dafd3578b0a..6890b595253ef7618d9230f394e6c70c88bc21c6 100644
--- a/src/liboggz/oggz_comments.c
+++ b/src/liboggz/oggz_comments.c
@@ -630,6 +630,9 @@ oggz_comments_decode (OGGZ * oggz, long serialno,
          n = c+len - value;
       }
 
+      /* Comment names with zero length (aka "") are invalid */
+      if (0 == name[0]) return OGGZ_ERR_COMMENT_INVALID;
+
       if (n != 0) {
          if ((nvalue = oggz_strdup_len (value, n)) == NULL)
            return OGGZ_ERR_OUT_OF_MEMORY;