$OpenBSD: patch-stor_c,v 1.2 2005/01/26 00:33:30 pvalchev Exp $
--- stor.c.orig	Thu Sep 23 13:46:22 2004
+++ stor.c	Thu Jan 13 08:42:35 2005
@@ -464,11 +464,13 @@ n_stor_applefile( SNET *sn, char *pathde
     struct timeval      	tv;
     struct applefileinfo	afinfo;
     off_t			size;
+    size_t			len;
 
     /* Setup fake apple file info */
     /* Finder Info */
     memset( &afinfo, 0, sizeof( afinfo ));
-    sprintf( afinfo.ai.ai_data + FI_CREATOR_OFFSET, "%s", "RDMD" );
+    len = sizeof( afinfo.ai.ai_data );
+    (void)snprintf( afinfo.ai.ai_data + FI_CREATOR_OFFSET, len - FI_CREATOR_OFFSET, "%s", "RDMD" );
     afinfo.as_ents[AS_FIE].ae_id = ASEID_FINFO;
     afinfo.as_ents[AS_FIE].ae_offset = AS_HEADERLEN +
 	( 3 * sizeof( struct as_entry ));               /* 62 */
