SVNews r322427

NOTE: This service is experimental and subject to change! Use at your own risk!

2017-08-12 15:18:17 - r322427 by kib (Konstantin Belousov)

Complete list of files affected by revision r322427:

(Note: At the moment, these links point to ViewVC on svn.freebsd.org. They are probably slow. Do not overuse.)

  History   Contents   Diff   MODIFY   /head/lib/libc/stdlib/set_constraint_handler_s.c  
  History   Contents   Diff   MODIFY   /head/lib/libc/string/memset_s.c  
  History   Contents   Diff   MODIFY   /head/lib/libc/tests/string/memset_s_test.c  

Commit message:

Improve standard compliance for memset_s() and abort_handler_s().

abort_handler_s() currently simply calls abort(), though the standard
specifies more: "Writes an implementation-defined message to stderr
which must include the string pointed to by msg and calls abort()."

memset_s() is missing error condition "n > smax", and does not invoke
the constraint handler after filling the buffer: "following errors are
detected at runtime and call the currently installed constraint
handler function after storing ch in every location of the destination
range [dest, dest+destsz) if dest and destsz are themselves valid",
one of the errors is "n > smax" itself.

Submitted by: Yuri Pankov <yuripv@gmx.com>
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D11991

 


Powered by Python FreeBSD support by secnetix GmbH & Co. KG

Page generated in 31 ms, 3 files printed. Current time is 2017-10-19 19:47:45. All times are in UTC/GMT.