haiku/headers
Michael Lotz eec73693e0 PicturePlayer: Rework to be more safe against corrupted data.
This introduces a more sane API (currently private) that allows for
safer and possibly more efficient implementations:

* It uses a struct of named and typed function pointers instead of just
  a void pointer array. This adds type safety to the callbacks so the
  compiler can figure out if things match up before subtle bugs get
  introduced.
* It provides bounds for all strings/buffers passed to the callbacks.
* It uses const references instead of implicitly copying arguments.
* It folds stroke_x/fill_x pairs into draw_x functions with a fill
  argument to reduce the amount of functions needed.
* It uses unsigned values where negative values make no sense.

The old API has been implemented on top of the new one using adapter
functions. It makes copies of all data passed to the callbacks which
effectively keeps the picture data from being modified. This matches
with the R5 behaviour.

This also reimplements the buffer parsing to be safe against corrupted
data by validating that the types actually fit in the provided sizes
and buffers (using a templated reader).

Since this class is used from the app_server with user provided data,
making it more safe is important even though it comes with a slight
overhead (replicating R5 behaviour, i.e. crashing the app_server when
corrupted data is fed, doesn't seem very appropriate here).
2015-09-05 16:09:31 +02:00
..
build headers/os: Add gcc 5 to BeBuild.h 2015-06-24 23:06:23 -05:00
compatibility build: Convert to external libedit build package 2015-07-04 15:29:05 -05:00
config ARM: Be aware of ARMEL and ARMEL 2014-01-01 23:41:02 -07:00
cpp Add a <limits> header for gcc2. 2014-11-27 12:14:39 +01:00
glibc Make public glibc header printf.h usable. 2013-07-17 18:07:56 +02:00
libs Force use of std::isnan() in agg_conv_curve.h. 2015-07-25 23:42:14 +02:00
os BEmailMessage: added missing const, Date() returns time_t. 2015-09-04 17:33:17 +02:00
posix assert.h: reintroduce headers guard for function declarations. 2015-08-29 23:14:03 +02:00
private PicturePlayer: Rework to be more safe against corrupted data. 2015-09-05 16:09:31 +02:00
tools Remove preprocessor checks from TestShell.h 2014-07-29 23:05:52 +02:00