Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site wateng.UUCP Path: utzoo!watmath!wateng!padpowell From: padpowell@wateng.UUCP (PAD Powell) Newsgroups: net.unix-wizards Subject: Does anybody have a version of SPRINTF with bounds checking and flame Message-ID: <1323@wateng.UUCP> Date: Sun, 19-Aug-84 10:46:57 EDT Article-I.D.: wateng.1323 Posted: Sun Aug 19 10:46:57 1984 Date-Received: Mon, 20-Aug-84 00:38:29 EDT Organization: U of Waterloo, Ontario Lines: 15 Once again I have been stung with by sprintf(). Why was sprintf() not provided with a "bounds" check version, like sprintf( target, count, format, args ) char *target, *format; int count; void args; I am seriously considering adding this functionailt, and calling it snprintf(), A LA strcmp(), strncmp(). Problems caused by overflowing the allocated string took two days to track down, as sprintf was corrupting some MALLOC headers... If anybody has comments or suggestions, I would be more than happy to hear them. Patrick ("And don't even mention Garbage Collection") Powell