19 lines
818 B
Plaintext
19 lines
818 B
Plaintext
$OpenBSD: patch-stor_c,v 1.4 2007/09/04 20:52:13 jasper Exp $
|
|
--- stor.c.orig Sat May 6 18:07:45 2006
|
|
+++ stor.c Wed Jul 18 09:41:17 2007
|
|
@@ -482,11 +482,13 @@ n_stor_applefile( SNET *sn, char *pathdesc, char *path
|
|
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( (char *)(afinfo.ai.ai_data + FI_CREATOR_OFFSET), "%s", "RDMD" );
|
|
+ len = sizeof( afinfo.ai.ai_data );
|
|
+ (void)snprintf( (char *)(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 */
|