2012-04-14 11:09:55 -04:00
|
|
|
$OpenBSD: patch-libtiff_tif_extension_c,v 1.4 2012/04/14 15:09:55 naddy Exp $
|
|
|
|
--- libtiff/tif_extension.c.orig Wed Apr 11 18:27:24 2012
|
|
|
|
+++ libtiff/tif_extension.c Wed Apr 11 18:28:53 2012
|
2010-06-30 13:10:07 -04:00
|
|
|
@@ -81,6 +81,7 @@ void TIFFSetClientInfo( TIFF *tif, void *data, const c
|
|
|
|
|
|
|
|
{
|
|
|
|
TIFFClientInfoLink *link = tif->tif_clientinfo;
|
|
|
|
+ size_t namelen = strlen(name);
|
|
|
|
|
|
|
|
/*
|
|
|
|
** Do we have an existing link with this name? If so, just
|
|
|
|
@@ -102,9 +103,9 @@ void TIFFSetClientInfo( TIFF *tif, void *data, const c
|
|
|
|
link = (TIFFClientInfoLink *) _TIFFmalloc(sizeof(TIFFClientInfoLink));
|
|
|
|
assert (link != NULL);
|
|
|
|
link->next = tif->tif_clientinfo;
|
2012-04-14 11:09:55 -04:00
|
|
|
- link->name = (char *) _TIFFmalloc((tmsize_t)(strlen(name)+1));
|
|
|
|
+ link->name = (char *) _TIFFmalloc((tmsize_t)(namelen+1));
|
2010-06-30 13:10:07 -04:00
|
|
|
assert (link->name != NULL);
|
|
|
|
- strcpy(link->name, name);
|
|
|
|
+ strlcpy(link->name, name, namelen+1);
|
|
|
|
link->data = data;
|
|
|
|
|
|
|
|
tif->tif_clientinfo = link;
|