shithub: libopusenc

Download patch

ref: 802597c5e662615180948a72a2351c8bd39bb7d2
parent: 7fd2315d11e8922ea86cb29db87248a309ae2515
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Fri Dec 29 08:28:59 EST 2017

Fixes uninitialized seen_file_icons

--- a/src/opusenc.c
+++ b/src/opusenc.c
@@ -88,6 +88,7 @@
   libopus_str = opus_get_version_string();
   snprintf(vendor_str, sizeof(vendor_str), "%s, %s %s", libopus_str, PACKAGE_NAME, PACKAGE_VERSION);
   _ope_comment_init(&c->comment, &c->comment_length, vendor_str);
+  c->seen_file_icons = 0;
   if (c->comment == NULL) {
     free(c);
     return NULL;
--- a/src/picture.c
+++ b/src/picture.c
@@ -251,10 +251,6 @@
   size_t         data_length;
   size_t         b64_length;
   *error = OPE_OK;
-  /*If a filename has a '|' in it, there's no way we can distinguish it from a
-     full specification just from the spec string.
-    Instead, try to open the file.
-    If it exists, the user probably meant the file.*/
   if (picture_type < 0) picture_type=3;
   if (picture_type > 20) {
     *error=OPE_INVALID_PICTURE;