From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078701111295.tru64-unix-managers.marc@archive.invalid> From: dsr () mail ! lns ! cornell ! edu (Daniel S ! Riley) Date: Thu, 05 Mar 1998 22:09:16 +0000 To: tru64-unix-managers Subject: warning about SUMMARY: snprintf() X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078701111295 Tim Winders writes: > As it turns out, Digital Unix 4.0D DOES have snprintf() as part of the > /usr/lib/libdb.a library. I only had to include that library and > everything is working great! I'm going to violate list protocol for a moment for a security warning: Versions of Digital Unix prior to 4.0D have a *dummy* snprintf() in libdb.a which discards the length limit and just does a sprintf. Since snprintf() is often used for security reasons (to avoid buffer overrun attacks), use of this dummy snprintf() could compromise the security of your system. At the very least, it won't have the behavior the programmer expected. Fortunately, it looks like Digital fixed this in 4.0D (yay), so using the snprintf() in libdb.a on 4.0D is safe; using the snprintf() from libdb.a in previous versions of Digital Unix is not safe and should be avoided. -- Dan Riley dsr@mail.lns.cornell.edu Wilson Lab, Cornell University "History teaches us that days like this are best spent in bed"