pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/audio/mserv Avoid overlapping strcpy(), replace by mem...
details: https://anonhg.NetBSD.org/pkgsrc/rev/7de4bbfa2fbc
branches: trunk
changeset: 396046:7de4bbfa2fbc
user: martin <martin%pkgsrc.org@localhost>
date: Mon May 20 14:47:13 2019 +0000
description:
Avoid overlapping strcpy(), replace by memmove (trivial, as the string
length is already known)
diffstat:
audio/mserv/Makefile | 4 ++--
audio/mserv/distinfo | 4 ++--
audio/mserv/patches/patch-ae | 11 ++++++-----
3 files changed, 10 insertions(+), 9 deletions(-)
diffs (61 lines):
diff -r 5ca76f3a930a -r 7de4bbfa2fbc audio/mserv/Makefile
--- a/audio/mserv/Makefile Mon May 20 14:16:27 2019 +0000
+++ b/audio/mserv/Makefile Mon May 20 14:47:13 2019 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.44 2018/08/22 09:42:55 wiz Exp $
+# $NetBSD: Makefile,v 1.45 2019/05/20 14:47:13 martin Exp $
DISTNAME= mserv-0.35
-PKGREVISION= 19
+PKGREVISION= 20
CATEGORIES= audio
#MASTER_SITES= http://www.mserv.org/download/
diff -r 5ca76f3a930a -r 7de4bbfa2fbc audio/mserv/distinfo
--- a/audio/mserv/distinfo Mon May 20 14:16:27 2019 +0000
+++ b/audio/mserv/distinfo Mon May 20 14:47:13 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.21 2015/11/03 01:12:43 agc Exp $
+$NetBSD: distinfo,v 1.22 2019/05/20 14:47:13 martin Exp $
SHA1 (mserv-0.35.tar.gz) = 850835946e4d5a0deccdd22a18f30170c0a7b57c
RMD160 (mserv-0.35.tar.gz) = 0665c1b1807da675486b58013715b737b8de606e
@@ -8,7 +8,7 @@
SHA1 (patch-ab) = 91d6840eae30182343db97d3f67d23d0c423dbe7
SHA1 (patch-ac) = 068b14b4a8a0ce4dcb19e0cd28fc6a7296f86dad
SHA1 (patch-ad) = 105edf313c2101f0961aab8a94022a5a0d07eb22
-SHA1 (patch-ae) = c46482ba78594d4fc22262c540d7356e1b651c0e
+SHA1 (patch-ae) = c0bf4f40fd027c94e057d2444bf9e2a7ac60b942
SHA1 (patch-af) = 1ce6b64c155f141607a7f43fd3f823bb415a7fdc
SHA1 (patch-ag) = 7d5fae48c89db4b9bdccf371528c3b3e890455a9
SHA1 (patch-ah) = c089ae56f23c83291a1e9b5502b952cd58be4860
diff -r 5ca76f3a930a -r 7de4bbfa2fbc audio/mserv/patches/patch-ae
--- a/audio/mserv/patches/patch-ae Mon May 20 14:16:27 2019 +0000
+++ b/audio/mserv/patches/patch-ae Mon May 20 14:47:13 2019 +0000
@@ -1,7 +1,7 @@
-$NetBSD: patch-ae,v 1.9 2009/09/26 21:16:58 martin Exp $
+$NetBSD: patch-ae,v 1.10 2019/05/20 14:47:13 martin Exp $
--- mserv/mp3info.c.orig 2003-07-29 02:17:48.000000000 +0200
-+++ mserv/mp3info.c 2009-09-26 22:11:43.000000000 +0200
++++ mserv/mp3info.c 2019-05-20 16:41:02.827154805 +0200
@@ -26,7 +26,17 @@
#define h_id(val) ((val>>19)&1)
#define h_thing(val) ((val>>20)&0xfff)
@@ -47,12 +47,13 @@
if (frame->frameid[0] == 'T' && memcmp(frame->frameid + 1, "XXX", 3)) {
- frame->data[frame->datalen] = 0;
- if (frame->data[0] == 0) /* Only handle non unicode */
+- strcpy(frame->data, frame->data + 1);
+- else
+- frame->data[0] = 0;
+ if (frame->data[0] == 0) {
+ /* ISO8859-1 */
+ frame->data[frame->datalen] = 0;
- strcpy(frame->data, frame->data + 1);
-- else
-- frame->data[0] = 0;
++ memmove(frame->data, frame->data + 1, frame->datalen);
+ } else if (frame->data[0] == 1 && frame->datalen >= 5) {
+ /* unicode, convert as long as it is 8 bit only */
+ int d = 0, i = 1, off0 = 0, off1 = 1;
Home |
Main Index |
Thread Index |
Old Index