junklib: fix pointer going out of scope bug (upstream git commit d97d5490e45462b8b4135a3745e56b003ef494cf) ffmpeg: increase the supported file extension limit to 1024 (upstream git commit 67f6568151248965dd89ef3304464a50e9982a20) ffmpeg: buffer overflow fix when there are >= 256 extensions supported by ffmpeg (upstream git commit f6646210f643e4fb75f352cfb021dcfc0ed0b628)
43 lines
1.1 KiB
Plaintext
43 lines
1.1 KiB
Plaintext
$OpenBSD: patch-junklib_c,v 1.5 2017/09/08 10:44:20 dcoppa Exp $
|
|
|
|
commit d97d5490e45462b8b4135a3745e56b003ef494cf
|
|
Author: Alexey Yakovenko <wakeroid@gmail.com>
|
|
Date: Mon Jul 17 19:24:31 2017
|
|
|
|
junklib: fix pointer going out of scope bug
|
|
|
|
Index: junklib.c
|
|
--- junklib.c.orig
|
|
+++ junklib.c
|
|
@@ -33,7 +33,6 @@
|
|
#include <string.h>
|
|
#undef HAVE_ICI
|
|
#if HAVE_ICONV
|
|
- #define LIBICONV_PLUG
|
|
#include <iconv.h>
|
|
#elif HAVE_ICU
|
|
#warning icu
|
|
@@ -586,7 +585,7 @@ junk_iconv (const char *in, int inlen, char *out, int
|
|
if (cd == (iconv_t)-1) {
|
|
return -1;
|
|
}
|
|
-#ifdef __linux__
|
|
+#if defined(__linux__) || defined (__OpenBSD__)
|
|
char *pin = (char*)in;
|
|
#else
|
|
const char *pin = in;
|
|
@@ -1025,11 +1024,12 @@ junk_id3v1_read_int (playItem_t *it, char *buffer, con
|
|
return -1;
|
|
}
|
|
|
|
+ const char *cs = NULL;
|
|
+
|
|
if (it) {
|
|
if (memcmp (buffer, "TAG", 3)) {
|
|
return -1; // no tag
|
|
}
|
|
- const char *cs = NULL;
|
|
charset = &cs;
|
|
int res = junk_id3v1_read_int (NULL, buffer, charset);
|
|
if (res) {
|