pkgsrc-ng/www/swill/patches/patch-Source_Objects_base_c
2013-09-26 17:14:40 +02:00

16 lines
593 B
Plaintext

$NetBSD: patch-Source_Objects_base_c,v 1.1 2011/09/29 11:27:07 dholland Exp $
Use correct printf format. While on the same line, use snprintf.
--- Source/Objects/base.c~ 2007-08-09 15:17:37.000000000 +0000
+++ Source/Objects/base.c
@@ -94,7 +94,7 @@ DohStr(const DOH *obj) {
if (objinfo->doh_str) {
return (objinfo->doh_str)(b);
}
- sprintf(buffer,"<Object '%s' at %x>", objinfo->objname, (unsigned int) b);
+ snprintf(buffer, sizeof(buffer), "<Object '%s' at %p>", objinfo->objname, b);
return NewString(buffer);
} else {
return NewString(obj);