Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Jan 2014 22:57:42 +0000 (UTC)
From:      Joe Marcus Clarke <marcus@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org
Subject:   svn commit: r340223 - in branches/2014Q1/net/netatalk3: . files
Message-ID:  <201401182257.s0IMvgCr083362@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marcus
Date: Sat Jan 18 22:57:42 2014
New Revision: 340223
URL: http://svnweb.freebsd.org/changeset/ports/340223
QAT: https://qat.redports.org/buildarchive/r340223/

Log:
  MFH: (r340219)
  
  Fix a segfault when Zeroconf is enabled with Timemachine.
  
  PR:		185862
  Submitted by:	jpaetzel
  Approved by:	portmgr

Added:
  branches/2014Q1/net/netatalk3/files/patch-etc_afpd_afp_mdns.c
     - copied unchanged from r340219, head/net/netatalk3/files/patch-etc_afpd_afp_mdns.c
Modified:
  branches/2014Q1/net/netatalk3/Makefile

Modified: branches/2014Q1/net/netatalk3/Makefile
==============================================================================
--- branches/2014Q1/net/netatalk3/Makefile	Sat Jan 18 22:57:37 2014	(r340222)
+++ branches/2014Q1/net/netatalk3/Makefile	Sat Jan 18 22:57:42 2014	(r340223)
@@ -3,7 +3,7 @@
 
 PORTNAME=	netatalk
 PORTVERSION=	3.1.0
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	1
 CATEGORIES=	net
 MASTER_SITES=	SF

Copied: branches/2014Q1/net/netatalk3/files/patch-etc_afpd_afp_mdns.c (from r340219, head/net/netatalk3/files/patch-etc_afpd_afp_mdns.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2014Q1/net/netatalk3/files/patch-etc_afpd_afp_mdns.c	Sat Jan 18 22:57:42 2014	(r340223, copy of r340219, head/net/netatalk3/files/patch-etc_afpd_afp_mdns.c)
@@ -0,0 +1,34 @@
+--- etc/afpd/afp_mdns.c.orig	2013-10-28 06:43:13.000000000 -0700
++++ etc/afpd/afp_mdns.c	2014-01-17 22:10:59.000000000 -0800
+@@ -37,17 +37,15 @@
+  * Its easier to use asprintf to set the TXT record values
+  */
+ #define TXTRecordPrintf(rec, key, args, ...) {           \
+-        char *str;                                      \
+-        asprintf(&str, args);                           \
++        char str[1024];                                      \
++        sprintf(str, args);                           \
+         TXTRecordSetValue(rec, key, strlen(str), str);  \
+-        free(str);                                      \
+     }
+ #define TXTRecordKeyPrintf(rec, k, var, args, ...) {     \
+-        char *key, *str;                                \
+-        asprintf(&key, k, var);                         \
+-        asprintf(&str, args);                           \
++        char key[1024], str[1024];                                \
++        sprintf(key, k, var);                         \
++        sprintf(str, args);                           \
+         TXTRecordSetValue(rec, key, strlen(str), str);  \
+-        free(str); free(key);                           \
+     }
+ 
+ static struct pollfd *fds;
+@@ -134,7 +132,7 @@
+ 
+     /* Register our service, prepare the TXT record */
+     TXTRecordCreate(&txt_adisk, 0, NULL);
+-    TXTRecordPrintf(&txt_adisk, "sys", "waMa=0,adVF=0x100");
++    TXTRecordPrintf(&txt_adisk, "sys", "waMa=0,adVF=0x100", NULL);
+ 
+     /* Build AFP volumes list */
+     int i = 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401182257.s0IMvgCr083362>