pkgsrc/multimedia/libmp4v2/patches/patch-lib_mp4v2_atom__standard.cpp
maya fa0a8259fc libmp4v2: fix build more properly.
if 0 likely out of bounds write, we only have one scratch channel,
don't write to a second if asked to do stereo (thanks, GCC 4.5.3!)

convert lowercase min, max to uppercase - libstdc++6 doesn't approve
of it. mostly using sed, because there's too many occurences.

if we're not returning anything, use a void return type.

fix likely issue with signed char - 0251 may be truncated, but the
equivalent \xa9 won't be.

don't store a return value if we're not going to check it.

correct misleading indentation.

Remove -fpermissive too, as it caused jperkin issues. I could build
without removing -Werror, but I'll keep it since it's full of warnings.

XXX do we want a security advisory for this, if it can be triggered?
2017-05-06 18:12:00 +00:00

32 lines
1.4 KiB
C++

$NetBSD: patch-lib_mp4v2_atom__standard.cpp,v 1.1 2017/05/06 18:12:00 maya Exp $
Handle signed char better. 0251 is \xa9 (copyright sign)
but it's truncated if char is signed
--- lib/mp4v2/atom_standard.cpp.orig 2007-06-04 16:47:36.000000000 +0000
+++ lib/mp4v2/atom_standard.cpp
@@ -22,15 +22,15 @@
#include "mp4common.h"
#include "atoms.h"
-static const char name[5]={0251,'n', 'a', 'm', '\0'};
-static const char art[5]={0251,'A', 'R', 'T', '\0'};
-static const char wrt[5]={0251,'w', 'r', 't', '\0'};
-static const char alb[5]={0251,'a', 'l', 'b', '\0'};
-static const char day[5]={0251,'d', 'a', 'y', '\0'};
-static const char too[5]={0251,'t', 'o', 'o', '\0'};
-static const char cmt[5]={0251,'c', 'm', 't', '\0'};
-static const char gen[5]={0251,'g', 'e', 'n', '\0'};
-static const char grp[5]={0251,'g', 'r', 'p', '\0'};
+static const char name[5]={'\xa9','n', 'a', 'm', '\0'};
+static const char art[5]={'\xa9','A', 'R', 'T', '\0'};
+static const char wrt[5]={'\xa9','w', 'r', 't', '\0'};
+static const char alb[5]={'\xa9','a', 'l', 'b', '\0'};
+static const char day[5]={'\xa9','d', 'a', 'y', '\0'};
+static const char too[5]={'\xa9','t', 'o', 'o', '\0'};
+static const char cmt[5]={'\xa9','c', 'm', 't', '\0'};
+static const char gen[5]={'\xa9','g', 'e', 'n', '\0'};
+static const char grp[5]={'\xa9','g', 'r', 'p', '\0'};
MP4StandardAtom::MP4StandardAtom (const char *type) : MP4Atom(type)
{