diff --git a/libtransmission/torrent.c b/libtransmission/torrent.c index 589aac1d9..ebff3ff54 100644 --- a/libtransmission/torrent.c +++ b/libtransmission/torrent.c @@ -1156,7 +1156,7 @@ tr_torrentStat( tr_torrent * tor ) s->id = tor->uniqueId; s->activity = tr_torrentGetActivity( tor ); s->error = tor->error; - memcpy( s->errorString, tor->errorString, sizeof( s->errorString ) ); + tr_strlcpy( s->errorString, tor->errorString, sizeof( s->errorString ) ); s->manualAnnounceTime = tr_announcerNextManualAnnounce( tor );