Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_unix/sys/src/cmd/unix/u9fs/safecpy.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <stdio.h>
2
 
3
void
4
safecpy(char *to, char *from, int tolen)
5
{
6
	int fromlen;
7
	memset(to, 0, tolen);
8
	fromlen = from ? strlen(from) : 0;
9
	if (fromlen > tolen)
10
		fromlen = tolen;
11
	memcpy(to, from, fromlen);
12
}