* Do not trust the client! ServerFont::GetEscapements() now takes a

parameter for the length of the arrays, so that even if the char/byte
  counts do not match, no memory is overwritten anymore.
  This fixes bug #1862; .canna obviously contains invalid UTF-8 
  characters, or there is a bug in StyledEdit (or deeper) and it doesn't 
  call BFont::GetEscapements() correctly.
* Fixed some cases of unchecked allocations in the font handling methods
  of ServerApp, added TODOs to all other ones.
* Improved error code when creating a window fails.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24160 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2008-02-28 00:22:48 +00:00
parent e705558bb9
commit a4de7fa0fa
3 changed files with 88 additions and 41 deletions
+5 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2001-2007, Haiku.
* Copyright 2001-2008, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
@@ -125,12 +125,14 @@ class ServerFont {
edge_info edgeArray[]) const;
status_t GetEscapements(const char charArray[],
int32 numBytes, escapement_delta delta,
int32 numBytes, int32 numChars,
escapement_delta delta,
BPoint escapementArray[],
BPoint offsetArray[]) const;
status_t GetEscapements(const char charArray[],
int32 numBytes, escapement_delta delta,
int32 numBytes, int32 numChars,
escapement_delta delta,
float widthArray[]) const;
status_t GetBoundingBoxes(const char charArray[],