SHA256
1
0
forked from pool/libid3tag
libid3tag/id3_ucs4_length-sanity-check.patch
Takashi Iwai c1425570eb Accepting request 967834 from home:manfred-h
- Add id3_ucs4_length-sanity-check.patch as Patch0.
  The patch helps to avoid a segfault in programs using this library,
  such as minidlna and potentially others; for details see
  <https://github.com/tenacityteam/libid3tag/pull/7> and
  <https://github.com/tenacityteam/libid3tag/issues/6>

OBS-URL: https://build.opensuse.org/request/show/967834
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/libid3tag?expand=0&rev=21
2022-04-08 14:23:24 +00:00

14 lines
354 B
Diff

diff -rup libid3tag-0.16.1.orig/ucs4.c libid3tag-0.16.1/ucs4.c
--- libid3tag-0.16.1.orig/ucs4.c 2021-08-15 22:52:07.000000000 +0200
+++ libid3tag-0.16.1/ucs4.c 2022-04-08 09:47:54.980481313 +0200
@@ -39,6 +39,9 @@ id3_length_t id3_ucs4_length(id3_ucs4_t
{
id3_ucs4_t const *ptr = ucs4;
+ if (! ucs4)
+ return 0;
+
while (*ptr)
++ptr;