From 232053ed1c7619490845a0f911fc50245028d5df Mon Sep 17 00:00:00 2001 From: Andrew McNab Date: Wed, 12 Oct 2005 11:43:53 +0000 Subject: [PATCH] Use a snprintf in grst_asn1.c --- org.gridsite.core/src/gridsite.spec | 2 +- org.gridsite.core/src/grst_asn1.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/org.gridsite.core/src/gridsite.spec b/org.gridsite.core/src/gridsite.spec index 4e7dfe7..0819eb0 100644 --- a/org.gridsite.core/src/gridsite.spec +++ b/org.gridsite.core/src/gridsite.spec @@ -63,7 +63,7 @@ OPENSSL_LIBS=$OPENSSL_LIBS FLAVOR_EXT=$FLAVOR_EXT ln -sf %(echo ${MYPREFIX:-/usr})/share/doc/gridsite-%{version} \ %(echo ${MYPREFIX:-/usr})/share/doc/gridsite -%postun +#%postun rm -f %(echo ${MYPREFIX:-/usr})/share/doc/gridsite %files diff --git a/org.gridsite.core/src/grst_asn1.c b/org.gridsite.core/src/grst_asn1.c index 87dc5b0..bc92a87 100644 --- a/org.gridsite.core/src/grst_asn1.c +++ b/org.gridsite.core/src/grst_asn1.c @@ -472,11 +472,11 @@ int GRSTasn1GetX509Name(char *x509name, int maxlength, char *coords, for (i=1; ; ++i) { - sprintf(coordstmp, coords, i, 1); + snprintf(coordstmp, sizeof(coordstmp), coords, i, 1); iobj = GRSTasn1SearchTaglist(taglist, lasttag, coordstmp); if (iobj < 0) break; - sprintf(coordstmp, coords, i, 2); + snprintf(coordstmp, sizeof(coordstmp), coords, i, 2); istr = GRSTasn1SearchTaglist(taglist, lasttag, coordstmp); if (istr < 0) break; -- 1.8.2.3