bin/139492: pkg_install(1) - overlapping data buffer in call to snprintf

Garrett Cooper yanegomi at gmail.com
Tue Mar 23 08:00:13 UTC 2010


The following reply was made to PR bin/139492; it has been noted by GNATS.

From: Garrett Cooper <yanegomi at gmail.com>
To: bug-followup at FreeBSD.org, bruce at cran.org.uk
Cc:  
Subject: Re: bin/139492: pkg_install(1) - overlapping data buffer in call to 
	snprintf
Date: Tue, 23 Mar 2010 00:56:51 -0700

 --0016367d6878085a7f0482732832
 Content-Type: text/plain; charset=ISO-8859-1
 
     How about this instead? This uses c99-style string concatenation
 to accomplish what's being done with snprintf.
 Thanks!
 -Garrett
 
 --0016367d6878085a7f0482732832
 Content-Type: text/plain; charset=US-ASCII; name="bin.139492.diff.txt"
 Content-Disposition: attachment; filename="bin.139492.diff.txt"
 Content-Transfer-Encoding: base64
 X-Attachment-Id: f_g74ew5fq0
 
 PT09PSAvL2RlcG90L3Byb2plY3RzL3NvYzIwMDcvZ2Nvb3Blci1wa2dfaW5zdGFsbC1lbmhhbmNl
 bWVudHMtc2ltcGxpZmllZC91c3Iuc2Jpbi9wa2dfaW5zdGFsbC9saWIvbWF0Y2guYyMxIC0gL3Nj
 cmF0Y2gvZnJlZWJzZC9wZXJmb3JjZS9wa2dfaW5zdGFsbC1lbmhhbmNlbWVudHMvdXNyLnNiaW4v
 cGtnX2luc3RhbGwvbGliL21hdGNoLmMgPT09PQpAQCAtMjY3LDcgKzI2Nyw3IEBACiAJICovCiAJ
 aWYgKGlzZW1wdHlkaXIodG1wKSkKIAkgICAgY29udGludWU7Ci0Jc25wcmludGYodG1wLCBQQVRI
 X01BWCwgIiVzLyVzIiwgdG1wLCBDT05URU5UU19GTkFNRSk7CisJc3RybmNhdCh0bXAsICIvIiBD
 T05URU5UU19GTkFNRSwgUEFUSF9NQVgpOwogCWZwID0gZm9wZW4odG1wLCAiciIpOwogCWlmIChm
 cCA9PSBOVUxMKSB7CiAJICAgIHdhcm54KCJ0aGUgcGFja2FnZSBpbmZvIGZvciBwYWNrYWdlICcl
 cycgaXMgY29ycnVwdCIsIGluc3RhbGxlZFtpXSk7Cg==
 --0016367d6878085a7f0482732832--


More information about the freebsd-bugs mailing list