printf.3 (2554caf28c5cda1e74578b41c5a5c089d076ab3d) printf.3 (e125c135a88a6a1995006a1c03a8ebfcd7179c7c)
1.\" Copyright (c) 1990, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" Chris Torek and the American National Standards Committee X3,
6.\" on Information Processing Systems.
7.\"
8.\" Redistribution and use in source and binary forms, with or without

--- 674 unchanged lines hidden (view full) ---

683 if ((p = malloc(128)) == NULL)
684 return (NULL);
685 va_start(ap, fmt);
686 (void) vsnprintf(p, 128, fmt, ap);
687 va_end(ap);
688 return (p);
689}
690.Ed
1.\" Copyright (c) 1990, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" Chris Torek and the American National Standards Committee X3,
6.\" on Information Processing Systems.
7.\"
8.\" Redistribution and use in source and binary forms, with or without

--- 674 unchanged lines hidden (view full) ---

683 if ((p = malloc(128)) == NULL)
684 return (NULL);
685 va_start(ap, fmt);
686 (void) vsnprintf(p, 128, fmt, ap);
687 va_end(ap);
688 return (p);
689}
690.Ed
691.Sh SECURITY CONSIDERATIONS
692The
693.Fn sprintf
694and
695.Fn vsprintf
696functions are easily misused in a manner which enables malicious users
697to arbitrarily change a running program's functionality through
698a buffer overflow attack.
699(See
700the FSA
701and
702.Sx EXAMPLES . )
691.Sh SEE ALSO
692.Xr printf 1 ,
693.Xr scanf 3 ,
694.Xr setlocale 3
703.Sh SEE ALSO
704.Xr printf 1 ,
705.Xr scanf 3 ,
706.Xr setlocale 3
707.Rs
708.%T "The FreeBSD Security Architecture"
709.%J "/usr/share/doc/{to be determined}"
710.Re
695.Sh STANDARDS
696The
697.Fn fprintf ,
698.Fn printf ,
699.Fn sprintf ,
700.Fn vprintf ,
701.Fn vfprintf ,
702and

--- 114 unchanged lines hidden ---
711.Sh STANDARDS
712The
713.Fn fprintf ,
714.Fn printf ,
715.Fn sprintf ,
716.Fn vprintf ,
717.Fn vfprintf ,
718and

--- 114 unchanged lines hidden ---