openbsd-ports/graphics/xzgv/patches/patch-src_updatetn_c
alek 57b5969b4f Import xzgv 0.8
xzgv is a picture viewer for X, with a thumbnail-based file selector.
It uses GTK+ and Imlib. Most file formats are supported, and the
thumbnails used are compatible with xv, zgv, and the Gimp. It can also
be used with `xzgv file(s)', to effectively bypass the file selector.

From Julian Leyh <oenone@oenone.de>
2005-05-22 11:32:11 +00:00

15 lines
551 B
Plaintext

$OpenBSD: patch-src_updatetn_c,v 1.1.1.1 2005/05/22 11:32:11 alek Exp $
--- src/updatetn.c.orig Tue Apr 10 05:47:00 2001
+++ src/updatetn.c Thu May 12 15:33:55 2005
@@ -168,8 +168,8 @@ datptr=gtk_clist_get_row_data(GTK_CLIST(
if(datptr->isdir || stat(ptr,&realpic)==-1 || *ptr=='.')
return(1);
-strcpy(buf,".xvpics/");
-strncat(buf,ptr,sizeof(buf)-8-2); /* above string is 8 chars long */
+strlcpy(buf,".xvpics/",sizeof(buf));
+strlcat(buf,ptr,sizeof(buf));
/* if not there, or pic is newer, or thumbnail is unreadable,
* make a thumbnail.