openbsd-ports/net/netatalk/patches/patch-bin_uniconv_uniconv_c
2007-10-25 18:57:32 +00:00

22 lines
744 B
Plaintext

$OpenBSD: patch-bin_uniconv_uniconv_c,v 1.2 2007/10/25 18:57:32 steven Exp $
--- bin/uniconv/uniconv.c.orig Mon Jul 12 02:15:18 2004
+++ bin/uniconv/uniconv.c Thu Oct 25 20:30:05 2007
@@ -105,7 +105,7 @@ static int veto(const char *path)
static int do_rename( char* src, char *dst, struct stat *st)
{
- char adsrc[ MAXPATHLEN + 1];
+ char adsrc[ MAXPATHLEN];
struct stat tmp_st;
if (!stat(dst, &tmp_st)) {
@@ -121,7 +121,7 @@ static int do_rename( char* src, char *dst, struct sta
if (S_ISDIR(st->st_mode))
return 0;
- strcpy( adsrc, ad_path( src, 0 ));
+ strlcpy( adsrc, ad_path( src, 0 ), sizeof(adsrc));
if (rename( adsrc, ad_path( dst, 0 )) < 0 ) {
struct stat ad_st;